PHP notice

Trying to get property of non-object

/var/www/dobsoft/www/protected/controllers/ExtensionController.php(86)

74             'left'=>Category::model()->left_menu(),
75         ));
76     }
77 
78     /**
79      * Lists ext one category.
80      */
81     public function actionCategory($url, $app = false)
82     {
83         $category = Category::model()->findByAttributes(array('url'=>$url));
84         $data['category'] = $category;
85         $data['left'] = Category::model()->left_menu();
86         $exts = Extension::model()->findAllByAttributes(array('category_id'=>$category->id,'status'=>1));
87         $data['extensions'] = $exts;
88         if(!empty($app)){
89             $app = Extension::model()->findByAttributes(array('url'=>$app,'status'=>1));
90             $data['app'] = $app;
91             $comment = new Comment;
92             if(Yii::app()->user->isGuest){
93                 $comment->scenario = 'Guest';
94             }
95             if(isset($_POST['Comment'])) {
96                 //$status = Setting::model()->findByPk(0); // statusComment
97                 $comment->attributes    = $_POST['Comment'];
98                 $comment->ext_id      = $app->id;

Stack Trace

#14
+
 /var/www/dobsoft/www/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-19 06:40:19 nginx/1.10.3 Yii Framework/1.1.15