PHP notice

Undefined offset: 0

/home/csookniyom/public_html/protected/controllers/SiteController.php(258)

246                 $this->render('lifestyle/index',array('message'=>$message));
247             }
248         }
249     }
250     public function actionDestination()
251     {
252         $message['page'] = 'destination';
253         $message['style'] = "DESTINATION";
254         if(isset($_REQUEST['id'])){ // detail
255             $criteria = new CDbCriteria();
256             $criteria->addInCondition("id", array($_REQUEST['id']));
257             $result = Travel::model()->findAll($criteria);
258             $message['datas'] = $result[0];
259 
260             $others = new CDbCriteria();
261             $others->addCondition("id != :t");
262             $others->params[':t'] = $_REQUEST['id'];
263             $others->limit = 3;
264             $others->order = 'id DESC';
265             $result = Travel::model()->findAll($others);
266             $message['others'] = $result;
267 
268             $this->render('lifestyle/detail',array('message'=>$message));
269         }
270         else{

Stack Trace

#7
+
 /home/csookniyom/public_html/index.php(20): CApplication->run()
15 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 require_once($yii);
17 //Yii::createWebApplication($config)->run();
18 Yii::createWebApplication($config);
19 require_once($define); // load define path
20 Yii::app()->run();
21 
2024-03-28 18:05:58 Apache Yii Framework/1.1.15