PHP notice

Trying to get property of non-object

/home/vietnamw/public_html/protected/controllers/ToursController.php(91)

079         $tourID = Yii::app()->request->getParam('id', 0);
080         // Get Detail Tour Category
081         $tourCategoryDetail = TourCategory::model()->findByPk($tourCategoryID);
082         $tourDetail = Tours::model()->findByPk($tourID);
083         // Get List Other Tours
084         $toursOthersList = Tours::model()->findAll('tour_category=' . $tourCategoryID . ' and tour_id<>' . $tourID . ' ORDER BY tour_id desc');
085         // Get Category Tours
086         $tourCategoryList = TourCategory::model()->findAll('tour_category_id<>0 and status=1 Order by tour_category_id asc ');
087         // Get Old Tours
088         $oldToursList = Tours::model()->findAll('startdate<CURDATE() ORDER BY tour_id desc LIMIT 5 ');
089         // Get New Tours
090         $newToursList = Tours::model()->findAll('startdate>CURDATE() ORDER BY tour_id desc LIMIT 5 ');
091         $tourDetail->fulltext = $this->fixImageLinks($tourDetail->fulltext);
092         
093         $tourpicture = TourPictures::model()->findAll(' tourid=' . $tourID . ' order by id desc');
094         
095         // Data
096         $data = array(
097             'tourCategoryDetail' => $tourCategoryDetail,
098             'tourDetail' => $tourDetail,
099             'toursOthersList' => $toursOthersList,
100             'tourCategoryList' => $tourCategoryList,
101             'oldToursList' => $oldToursList,
102             'newToursList' => $newToursList,
103             'tourpicture' => $tourpicture,

Stack Trace

#7
+
 /home/vietnamw/public_html/index.php(12): CApplication->run()
07 defined('YII_DEBUG') or define('YII_DEBUG',true);
08 // specify how many levels of call stack should be shown in each log message
09 //defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
10 require_once($yii);
11 
12 Yii::createWebApplication($config)->run();
13 
14 
2024-03-28 15:51:24 LiteSpeed Yii Framework/1.1.13