Error

Using $this when not in object context

/home/csvjfghghosting/public_html/facebookads.skymedia.com.vn/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/csvjfghghosting/public_html/facebookads.skymedia.com.vn/protected/controllers/SiteController.php(385): Seo::getSeo(1, array("title" => "Khám phá các hình thức quảng cáo trên Facebook phổ b...", "description" => "Khám phá các hình thức quảng cáo trên Facebook phổ b...", "keyword" => "Khám phá các hình thức quảng cáo trên Facebook phổ b..."))
380             $arr_seo = array(
381                 'title' => $model->title,
382                 'description' => ($model->title . ' - ' . myExt::getBrief($model->brief)),
383                 'keyword' => $model->title
384             );
385             Seo::getSeo(Seo::NEWS_PAGE, $arr_seo);
386         }
387         $this->og_title = $model->title;
388         $this->og_description = myExt::getBrief($model->brief);
389         $this->og_type = 'article';
390         $this->og_image = 'http://' . $_SERVER['SERVER_NAME'] . Yii::app()->baseUrl . '/' . $model->image;
#10
+
 /home/csvjfghghosting/public_html/facebookads.skymedia.com.vn/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 error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );
11 require_once($yii);
12 Yii::createWebApplication($config)->run();
2024-03-28 20:37:55 LiteSpeed Yii Framework/1.1.16