Error

Call to a member function getMeasureProvider() on null

/var/www/html/protected/controllers/SearchProcedureController.php(56)

44 
45     /**
46      * The action used to view detail selected Procedure with
47      * the list of the commodities belong to this procedure
48      * @param integer $id
49      * @throws CHttpException
50      */
51     public function actionView2($id) {
52 
53         $this->layout = '//layouts/column1';
54         $id = (int) $id;
55         $model = Procedure::model()->localized()->findByPk($id);
56         $dataProvider = $model->getMeasureProvider();
57         if ($model === null)
58             throw new CHttpException(404, Yii::t('ui', 'The requested page does not exist.'));
59         $this->render('view2', array(
60             'model' => $model,
61             'dataProvider' => $dataProvider,
62         ));
63     }
64 
65     public function searchProcedure() {
66         $model = new ProcetureSearchForm();
67 
68         if (Yii::app()->request->isAjaxRequest) {

Stack Trace

#9
+
 /var/www/html/index.php(14): CApplication->run()
09 
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
2024-03-28 20:51:27 Apache/2.4.37 (centos) OpenSSL/1.1.1k Yii Framework/1.1.22