PHP notice

Trying to get property of non-object

/home/sectora70/public_html/protected/controllers/CatalogController.php(196)

184         $q_str = str_replace('&alpha=1', '', $q_str);
185         $q_str = str_replace('&price=0', '', $q_str);
186         $q_str = str_replace('&avail=0', '', $q_str);
187         $q_str = str_replace('&alpha=0', '', $q_str);
188 
189         $price = Yii::app()->request->getParam('price');
190         $avail = Yii::app()->request->getParam('avail');
191         $alpha = Yii::app()->request->getParam('alpha');
192 
193         $pageSize = Yii::app()->request->getParam('pageSize', 15);
194         $brand = Brands::model()->findByPk($id);
195 
196         if ($brand->title) $this->pageTitle = $brand->title;
197         if ($brand->description) $this->desc = $brand->description;
198         if ($brand->keywords) $this->kw = $brand->keywords;
199 
200         $crt = new CDbCriteria();
201         $crt->select = 't.*, p.price as sprice';
202         $crt->condition = 't.brand_id = :brand_id AND t.approve';
203         $crt->join = 'LEFT JOIN Products as p on t.id = p.owner_id';
204         $crt->group = 't.id';
205         $crt->order = 'ISNULL(t.num) ASC';
206 //    $crt->having = 'MIN(p.price)';
207         $crt->params += array(':brand_id' => $id);
208 

Stack Trace

#7
+
 /home/sectora70/public_html/index.php(30): CApplication->run()
25 
26 defined('UPL_FR') or define('UPL_FR', '/uploads/');
27 defined('UPL_BK') or define('UPL_BK', __DIR__ . UPL_FR);
28 
29 require_once($yii);
30 Yii::createWebApplication($config)->run();
2024-03-29 08:47:19 LiteSpeed Yii Framework/1.1.15