PHP Error

Undefined index: id

/home/stiz-nsk/stiz-nsk.ru/docs/protected/controllers/SiteController.php(12)

01 <?php
02 
03 class SiteController extends CController
04 {
05     public $metadescr;
06     public $metakeys;
07 
08     public function actionIndex()
09     {
10             $this->layout='inner';
11 
12             $id = intval($_GET['id']);
13             if( $id == 0 ) {$id = 71; $this->layout='main';}
14 
15             $model = Pages::model()->findByPk($id);
16             if(!empty($model))
17             {
18                     $this->metadescr = $model->keywords;
19                     $this->metakeys = $model->description;
20                     if(!empty($model->htitle)) $this->pageTitle = $model->htitle;
21                     else $this->pageTitle = $model->title;
22                     $this->render('index',array('model'=>$model));
23 
24             }

Stack Trace

#7
+
 /home/stiz-nsk/stiz-nsk.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();
2024-03-29 01:57:11 Apache/2.4.41 (Ubuntu) PHP/5.5.38 Yii Framework/1.1.7