Error

Call to a member function getStateOption() on null

/home/roapsouz/reestr.rossouz.ru/docs/protected/views/site/view.php(5)

01 <?php
02 /* @var $this SiteController */
03 /* @var $model Members */
04 
05 $this->pageTitle = $model->opf.' '.$model->name.' ('.$model->getStateOption($model->state).')';
06 
07 $dataView = array(
08     'model'=>      $model,
09     'sanctions'=>  $sanctions,
10     'auditPlans'=> $auditPlans,
11     'documents'=>  $documents,
12 );
13 
14 if(!function_exists('imagefordownload')){
15     function imagefordownload($filename)
16     {
17         $typename = substr(strrchr($filename, "."), 1);

Stack Trace

#3
+
 /home/roapsouz/reestr.rossouz.ru/docs/protected/controllers/SiteController.php(208): CController->renderPartial("/site/view", array("model" => null, "sanctions" => CActiveDataProvider, "auditPlans" => CActiveDataProvider, "documents" => CActiveDataProvider, ...))
203         $model = $this->member($id);
204 
205         $criteria = (new CDbCriteria())->compare('id_member', $id);
206 
207         $this->renderPartial('/site/view', [
208             'model' => $model,
209             'sanctions' => new CActiveDataProvider(new Sanction(), [
210                 'criteria' => $criteria,
211                 'sort' => [
212                     'defaultOrder' => 'protocolDate ASC'
213                 ],
#4
+
 /home/roapsouz/reestr.rossouz.ru/docs/protected/controllers/SiteController.php(195): SiteController->printPdf("135")
190     public function actionViewpdf($id)
191     {
192         ini_set('max_execution_time', 600);
193         ob_start();
194 
195         $this->printPdf($id);
196 
197         (new SavedAsPsd( ob_get_clean()))
198             ->result();
199     }
200 
#14
+
 /home/roapsouz/reestr.rossouz.ru/docs/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 17:39:43 Apache/2.4.53 (Red Hat Enterprise Linux 8) PHP/7.3.33 Yii Framework/1.1.13