PHP notice

Undefined index: type_id

/home/midscal1/domains/midscaleoffice7.com/public_html/km/protected/controllers/PresentCmsController.php(12)

01 <?php
02 
03 class PresentCmsController extends Controller {
04 
05     public function actionIndex() {
06         $this->layout = '//layouts/column2';
07         $this->render('//present/cms_page', array('arr' => $arr));
08     }
09 
10     public function actionList() {
11         $type = $_GET['type']; //0=แสดงระดับหมวด 1=แสดงระดับหมวดย่อย
12         $type_id = $_GET['type_id'];
13 
14         $title = '';
15         if($type==0){
16             $model = PwCategory::model()->findByPk($type_id);
17             $title = $model->name;
18         }else if($type==1){
19             $model = PwCollect::model()->findByPk($type_id);
20             $category = PwCategory::model()->findByPk($model->cate_id);
21             $title = $category->name." :: ".$model->name;
22         }else{
23             $title = "ทั้งหมด";
24         }

Stack Trace

#7
+
 /home/midscal1/domains/midscaleoffice7.com/public_html/km/index.php(17): CApplication->run()
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 define("ABS_PATH", dirname(__FILE__));
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
2024-03-28 21:41:39 Apache/2 Yii Framework/1.1.14