PHP notice

Trying to get property of non-object

/home/s/srobos/reestr.sro-bos.ru_new/public_html/protected/controllers/SiteController.php(134)

122 
123         if(!$model)
124             throw new Exception('Page not found', 404);
125 
126         $this->render('viewInsuranceCompany',array(
127             'model'=>$model,
128         ));
129     }
130 
131     public function actionViolation($id) {
132         $sanction = Sanction::model()->findByAttributes(array('iddoc'=>$id));
133         $violations = Violation::model()->findAllByAttributes(array('iddoc'=>$id));
134         $model = Members::model()->findByPk($sanction->id_member);
135 
136         if(!$model)
137             throw new Exception('Page not found', 404);
138 
139         $this->render('violation',array(
140             'model'=>$model,
141             'sanction'=>$sanction,
142             'violations'=>$violations,
143         ));
144     }
145 
146     public function actionView($id)

Stack Trace

#9
+
 /home/s/srobos/reestr.sro-bos.ru_new/public_html/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
16 ?>
2024-03-28 13:37:36 Apache/2.4.55 (Unix) Yii Framework/1.1.13