Error

Using $this when not in object context

/home/ndtvietnam/public_html/protected/models/Seo.php(159)

147                 'pagesize' => Yii::app()->params['defaultPageSize'],
148             )
149         ));
150     }
151     
152     public function getSeo($page, $arr = null)
153     {
154         $row = self::model()->find(array(
155         'condition' => 'type = ' . $page,
156         ));
157         if (!empty($row))
158         {
159             $this->pageTitle = ((!empty($arr['title']))?($arr['title'] . ' '):'') . $row->keyword;
160             $this->keyword = ((!empty($arr['keyword']))?($arr['keyword'] . ' '):'') . $row->meta_keyword;
161             $this->description = ((!empty($arr['description']))?($arr['description'] . ' '):'') . $row->meta_description;
162             return true;
163         }
164         else 
165         {
166             return false;
167         }
168     }
169 
170     public function getSeoByType($type_id)
171     {

Stack Trace

#0
+
 /home/ndtvietnam/public_html/protected/controllers/SiteController.php(660): Seo::getSeo(2)
655         $pages->pageSize=$conf->prodperpage;
656         $pages->applyLimit($criteria);
657         $model = Product::model()->findAll($criteria);
658 
659         //=========SEO=========
660         Seo::getSeo(Seo::PRODUCT_PAGE);
661         //=========SEO=========
662 
663         
664         $this->render('pages/home_product', array(
665             'model' => $model,
#8
+
 /home/ndtvietnam/public_html/index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG',true);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
2024-03-28 20:53:04 LiteSpeed Yii Framework/1.1.17