PHP warning

Creating default object from empty value

E:\etc\www\RUJOB2018\protected\controllers\CompanyjobsController.php(55)

43      * @param integer $id the ID of the model to be displayed
44      */
45     public function actionView($id) {
46         $this->render('view', array(
47             'model' => $this->loadModel($id),
48         ));
49     }
50 
51     public function actionViewCompanyJobs($id) {
52         try {
53             if (Yii::app()->user->isGuest) {
54                 $post = Companyjobs::model()->findByPk($id);
55                 $post->comp_hit += 1;
56                 $post->save();
57             }
58             $this->render('viewCompanyJobs', array(
59                 'model' => $this->loadModel($id),
60             ));
61         } catch (Exception $e) {
62             throw new CHttpException($e);
63         }
64     }
65 
66     /**
67      * Creates a new model.

Stack Trace

#14
+
 E:\etc\www\RUJOB2018\index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG', true);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
2024-03-29 00:37:49 Apache/2.4.10 (Win64) mod_fcgid/2.3.9 Yii Framework/1.1.15