diff --git a/Application/Home/Controller/ArticleController.class.php b/Application/Home/Controller/ArticleController.class.php index 7c0e2af26..0ccce084d 100644 --- a/Application/Home/Controller/ArticleController.class.php +++ b/Application/Home/Controller/ArticleController.class.php @@ -82,6 +82,9 @@ class ArticleController extends HomeController { $field = 'id as document_id,category_id'; $decumentData = M('document')->field($field)->where("id={$id}")->find(); $promote_id = get_pid(); + if(empty($promote_id)) { + $promote_id = 0; + } foreach ($decumentData as $key => $value) { $decumentData['promote_id'] = $promote_id; $decumentData['create_time'] = time();