PHP notice

PHP notice

Trying to get property of non-object

/var/www/html/hos/prod/frontend/controllers/UsedVehicleController.php(145)

133             'model'=>$model
134         ));
135 
136     }
137 
138 
139 
140 
141     public function actionTopoffer() {
142 
143 
144         $model = UsedVehicleHighlight::getTopOfferVehicle();
145         $this->updateViewCounter($model, $model->id);
146 
147         $this->render('topoffer',array(
148             'model'=>$model
149         ));
150 
151 
152     }
153 
154 
155     public function actionTopofferContacts() {
156 
157         $model = UsedVehicleHighlight::getTopOfferVehicle();

Stack Trace

#5
+
 /var/www/html/hos/prod/common/components/WebApplication.php(33): CWebApplication->runController("usedVehicle/topoffer")
28      * that Apache polls its processes to see if they're alive. This function causes
29      * Yii to respond without logging errors.
30      */
31     public function runController($route) {
32         try {
33             parent::runController($route);
34         } catch (CHttpException $e) {
35             if (@$_SERVER['REQUEST_METHOD'] == 'OPTIONS' && @$_SERVER['REQUEST_URI'] == '*') {
36                 Yii::app()->end('Hello, friend!');
37             } else
38                 throw $e;
#8
+
 /var/www/html/hos/prod/frontend/www/index.php(44): CApplication->run()
39 
40 Yii::registerAutoloader(array("EZendAutoloader", "loadClass"), true);
41 */
42 
43 
44 $app->run();
45 
46 
47 
48 
49 /* uncomment if you wish to debug your resulting config */
2019-02-19 21:40:28 Yii Framework/1.1.14