PHP notice

Trying to get property of non-object

/home/npm4338303/npmos.ru/docs/Reestr/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/npm4338303/npmos.ru/docs/Reestr/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-19 07:07:11 Apache/2.4.41 (Ubuntu) PHP/5.3.29 Yii Framework/1.1.13