Error

Using $this when not in object context

/home/chuyentourdalat/public_html/protected/models/Seo.php(187)

175 
176         if (!empty($row))
177         {
178             $this->pageTitle = ((!empty($arr['title']))?($arr['title'] . ' '):'') . $row->keyword;
179             $this->keyword = ((!empty($arr['keyword']))?($arr['keyword'] . ' '):'') . $row->meta_keyword;
180             $this->description = ((!empty($arr['description']))?($arr['description'] . ' '):'') . $row->meta_description;
181             return true;
182         }
183         else if (!empty($arr))
184         {
185             $cont = Contact::getContact();
186 
187             $this->pageTitle = $arr['title'] . ' | ' . $cont->site_title;
188             $this->keyword = $arr['keyword'] . ', ' . $cont->site_keyword;
189             $this->description = $arr['description'] . ' ' . $cont->site_desc;
190 
191             return false;
192         }
193     }
194 
195     public function getSeoByType($type_id)
196     {
197         return self::model()->with('lang')->find(array(
198         'condition' => 'type = ' . $type_id . ' AND lang.code like "' . Yii::app()->session['lang'] . '"',
199         ));

Stack Trace

#0
+
 /home/chuyentourdalat/public_html/protected/controllers/SiteController.php(1199): Seo::getSeo(2, array("title" => "Tour ghép Đà Lạt hàng ngày", "description" => "Tour ghép Đà Lạt hàng ngày", "keyword" => "Tour ghép Đà Lạt hàng ngày"))
1194                 Seo::getSeo(
1195                     Seo::PRODUCT_PAGE,
1196                     array(
1197                         'title' => $cat->seo_title,
1198                         'description' => $cat->seo_desc,
1199                         'keyword' => $cat->seo_keyword
1200                     )
1201                 );
1202 
1203                 $this->og_title = $cat->seo_title;
1204                 $this->og_description = $cat->seo_desc;
#10
+
 /home/chuyentourdalat/public_html/index.php(15): CApplication->run()
10 date_default_timezone_set("Asia/Bangkok");
11 
12 
13 error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-29 00:16:19 LiteSpeed Yii Framework/1.1.16