PHP warning

Attempt to read property "id_member" on null

/home/virtwww/w_npsro-ru_7540ed09/http/reestrsro/protected/controllers/SiteController.php(133)

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

Stack Trace

#9
+
 /home/virtwww/w_npsro-ru_7540ed09/http/reestrsro/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
14 ?>
2024-03-28 11:34:17 Apache/2.4 Yii Framework/1.1.13