PHP notice

Trying to get property of non-object

/var/www/kaidian/protected/controllers/ReadController.php(325)

313                 //发送通知
314                 CommentModel::note($commentForm->attributes);
315                 CommentModel::commentNum(CommentModel::TYPE_NEW,$id);
316                 $this->redirect('/read/news/'.$id);
317             }
318         }
319         $page = Yii::app()->request->getParam('page',1);
320         $newInfo = NewsModel::newInfo($id);
321         if(empty($newInfo)){
322             $this->redirect('/read');
323         }
324         $this->id = isset($newInfo['info']->category->catid) ? $newInfo['info']->category->catid:'';
325         $this->catid = $newInfo['info']->category->parentid==184 ? 169:$newInfo['info']->category->parentid;
326         $this->pageTitle = $newInfo['info']['title'].'-开店邦';
327         $commentList = CommentModel::commentList($id,CommentModel::TYPE_NEW,$page);
328         //Yii::app()->params['defaultAvatar'];
329         if (Yii::app()->request->isAjaxRequest) {
330             $html = '';
331             if(!empty($commentList))
332             {
333                 ob_start();
334                 $this->renderPartial('_comment_view', array('commentList' => $commentList));
335                 $html = ob_get_contents();
336                 ob_clean();
337             }

Stack Trace

#9
+
 /var/www/kaidian/index.php(16): CApplication->run()
11 defined('YII_DEBUG') or define('YII_DEBUG',true);
12 $yii=dirname(__FILE__).'/framework/yii.php';
13 $config=dirname(__FILE__).'/protected/config/main.php';
14 require_once($yii);
15 require_once(dirname(__FILE__).'/common/config/aliases.php');
16 Yii::createWebApplication($config)->run();
2024-03-29 00:59:13 nginx/1.4.6 Yii Framework/1.1.17