PHP notice

Trying to get property of non-object

/var/www/stmal876/public_html/protected/modules/staffer/controllers/ViewController.php(89)

077         $this->seo($this->titles());
078         return true;
079     }
080     
081     /**
082      * Displays a particular model.
083      * @param integer $id the ID of the model to be displayed
084      */
085     public function actionView($id)
086     {
087         $this->layout='//layouts/templates/base';
088         $model = System::loadModel('Staffer', $id, null);        
089         if($model->status != 1 )
090             throw new CHttpException(404, Yii::t('admin', 'The request page does not exists!'));
091         $this->seo($model->office.' (от '.number_format($model->salary, 0, '', ' ').' руб.)');
092         
093         $this->render('view',array(
094             'model'=>$model,
095         ));
096     }
097 
098     /**
099      * Creates a new model.
100      * If creation is successful, the browser will be redirected to the 'view' page.
101      */

Stack Trace

#14
+
 /var/www/stmal876/public_html/index.php(18): CApplication->run()
13 $config = dirname(__FILE__).'/protected/config/main.php';
14 $WebApp = dirname(__FILE__).'/protected/components/WebApp.php';
15 
16 require_once($yii);
17 require_once($WebApp);
18 Yii::createApplication('WebApp', $config)->run();
2024-03-28 15:48:30 Apache Yii Framework/1.1.14