PHP notice

Trying to get property of non-object

/var/www/istekn.ru/data/www/istekn.ru/protected/controllers/ShopController.php(214)

202 
203                 foreach ($category->ancestors()->findAll() as $cat) {
204 
205                     if ($cat->id!=1 ) {
206                         $this->breadcrumbs[$cat->name] = Yii::app()->createUrl('/shop/index', array(/*'id' => $cat->id, */'view' => $cat->url));
207                     }
208                 }
209                 //if( $category->id != 1 ){
210 //                    $this->breadcrumbs[$category->name] = Yii::app()->createUrl('/shop/index', array(/*'id' => $category->id, */'view' => $category->url));
211                 //}
212             }                
213                 
214             $this->breadcrumbs[] = $category->name;
215 
216             $categories = Categories::model()->findAll(array(
217                 "condition" => "is_active = 1 and parent = $category->id",
218                 "order" => "t.lft"
219             ));
220 
221             $url_1=Yii::app()->request->url;
222             $pos = strpos($url_1, 'property');
223 
224             if( !empty( $categories ) && !(Yii::app()->request->isAjaxRequest ) && !$pos){
225                 $this->render('categories', array('categories' => $categories, 'category_1' => $category));
226                 Yii::app()->end();

Stack Trace

#14
+
 /var/www/istekn.ru/data/www/istekn.ru/index.php(14): CApplication->run()
09 error_reporting(E_ALL);
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', $environment->getTraceLevel());
12 
13 require_once($yii);
14 Yii::createWebApplication($environment->getConfig())->run();
2024-03-29 05:39:08 Apache/2.4.10 (Debian) Yii Framework/1.1.15