PHP warning

Creating default object from empty value

/var/www/html/qjyzzs/web/protected/modules/Muniversity/controllers/TourController.php(75)

63             'catname' => $catname[(int)$_GET['upid']] ? $catname[(int)$_GET['upid']] : '校园风光'
64         ));
65     }
66 
67     /**
68      * 查看图片
69      */
70     public function actionView($id)
71     {
72 
73         $model = StudentImg::model()->findByPk($id);
74         $catmodel = StudentGuide::model()->findByPk($model->upid);
75         $model->view ++;
76         $model->save();
77 
78         $this->render('view', array('model' => $model, 'upid'=>$catmodel->id, 'catname'=>$catmodel->name ? $catmodel->name : '校园风光'));
79     }
80 
81 }

Stack Trace

#9
+
 /var/www/html/qjyzzs/web/index.php(25): CApplication->run()
20 //    defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
21 //} 
22 $help=dirname(__FILE__).'/protected/config/help.php';
23 require_once($yii);
24 require_once($help);
25 Yii::createWebApplication($config)->run(); 
2024-03-28 16:50:39 nginx/1.21.4 Yii Framework/1.1.13