PHP notice

Trying to get property of non-object

/var/www/travelbook/data/www/travelbook.kz/protected/views/tour/view.php(44)

32     elseif ($name == "ROH") $title = "(runofthehouse) - размещение на усмотрение отеля.";
33 
34     return $title;
35 }
36 
37 
38 $monthes = array(
39     1 => 'январь', 2 => 'февраль', 3 => 'март', 4 => 'апрель',
40     5 => 'май', 6 => 'июнь', 7 => 'июль', 8 => 'август',
41     9 => 'сентябрь', 10 => 'октябрь', 11 => 'ноябрь', 12 => 'декабрь'
42 );
43 
44 $agencyType = ($model->agency->type == 0)?"Турагентство":"Туроператор";
45 
46 $curDate = strtotime($model->date);
47 ?>
48 <!-- top banner -->
49 <?php $this->beginWidget('system.web.widgets.CClipWidget', array('id'=>'top-banner-place')); ?>
50     <?php if(isset($topBanners[0]) && !empty($topBanners[0])){?>
51         <?php if($topBanners[0]->banner->banner_type == 1){?>
52             <div class="top-banner-place">
53                 <a href='<?=$topBanners[0]->banner->banner_url?>' id='<?=$topBanners[0]->banner->banner_id?>' class='banner-click'><img src="<?=Yii::app()->request->baseUrl.'/uploads/banner/'.$topBanners[0]->banner->banner_image?>"></a>
54             </div>
55         <?php }elseif($topBanners[0]->banner->banner_type == 2){?>
56             <div class="top-banner-place">

Stack Trace

#4
+
 /var/www/travelbook/data/www/travelbook.kz/protected/controllers/TourController.php(90): CController->render("view", array("model" => Tour, "likeTours" => array(), "topBanners" => array(), "rightFirstBanners" => array(BannerPlace)))
85         $this->render('view',array(
86             'model'=>$tour,
87             'likeTours'=> $likeTours,
88             'topBanners'=>$topBanners,
89             'rightFirstBanners'=>$rightFirstBanners,
90         ));
91     }
92 
93     /**
94      * Creates a new model.
95      * If creation is successful, the browser will be redirected to the 'view' page.
#19
+
 /var/www/travelbook/data/www/travelbook.kz/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 18:05:22 nginx/1.12.2 Yii Framework/1.1.13