PHP notice

Undefined offset: 0

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

157             $message['datas'] = $result;
158             $this->render('tailor/index',array('message'=>$message));
159         }
160     }
161     public function actionLifestyle()
162     {
163         $message['page'] = 'lifestyle';
164         $message['style'] = "LIFESTYLE";
165         if(isset($_REQUEST['id'])){ // detail
166             $criteria = new CDbCriteria();
167             $criteria->addInCondition("id", array($_REQUEST['id']));
168             $result = Travel::model()->findAll($criteria);
169             $message['datas'] = $result[0];
170 
171             $others = new CDbCriteria();
172             $others->addCondition("id != :t");
173             $others->params[':t'] = $_REQUEST['id'];
174             $others->limit = 3;
175             $others->order = 'id DESC';
176             $result = Travel::model()->findAll($others);
177             $message['others'] = $result;
178             $this->render('lifestyle/detail',array('message'=>$message));
179         }
180         else{
181             if(isset($_REQUEST['lifestyle']) and isset($_REQUEST['destination'])) // search

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 08:29:44 Apache Yii Framework/1.1.15