PHP warning

Creating default object from empty value

/home/ghostofvapor/public_html/protected/controllers/SiteController.php(1836)

1824                                 $models->users = $user;
1825                                 $models->save(false);
1826                             }
1827                         }
1828                     }
1829                 }
1830                 Yii::app()->user->setFlash('msgSuccess', 'Your reply has been posted successfully.');
1831             } else {
1832                 Yii::app()->user->setFlash('msgError', 'Sorry, your reply could not be posted. Please try again.');
1833             }
1834         } else {
1835             
1836             $forum->views+=1;
1837             $forum->update();
1838             /* set comment status equal to read(Yes) */
1839             $threadComment = ForumComment::model()->findAllByAttributes(array("post_id" => intval($_GET['id'])));
1840             foreach ($threadComment as $threads) {
1841                 $model = ForumComment::model()->findByPk($threads['id']);
1842                 $read = $model->read;
1843                 if ($read == 'No') {
1844                     $model->read = 'Yes';
1845                     $model->update();
1846                 }
1847             }
1848             

Stack Trace

#12
+
 /home/ghostofvapor/public_html/index.php(16): CApplication->run()
11 defined('YII_DEBUG') or define('YII_DEBUG',true);
12 // specify how many levels of call stack should be shown in each log message
13 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
14 
15 require_once($yii);
16 Yii::createWebApplication($config)->run();
2024-03-28 13:17:53 LiteSpeed Yii Framework/1.1.11