PHP notice

Trying to get property 'id' of non-object

/home/u1493004/kolonrektum.com/protected/modules/blog/controllers/front/DefaultController.php(91)

079      'yazilar' => $yazilar,
080      'cats' => $cats,
081      'sons' => $sons,
082      'pages'=>$pages
083    ));
084   }
085 
086 
087   function actionKategori($id = null) {
088     $this->layout = '//layouts/categoryContent';
089     $category = BlogCategory::model()->with('posts')->findByAttributes(array('slug' => $id));
090     $cats = BlogCategory::model()->findAll();
091     $sons = Post::model()->findAllByAttributes(array('category_id'=>$category->id),array('order' => 'id desc','limit'=>5));
092 
093     $criteria=new CDbCriteria();
094     $criteria->condition = 'language=:language AND category_id='.$category->id;
095     $criteria->params = array(':language'=>Yii::app()->wbrLanguage->activeLanguage->id);
096     $criteria->order = 't.order asc';
097 
098     $count=Post::model()->count($criteria);
099     $pages=new CPagination($count);
100 
101     $pages->pageSize=12;
102     $pages->applyLimit($criteria);
103     $yazilar=Post::model()->findAll($criteria);

Stack Trace

#9
+
 /home/u1493004/kolonrektum.com/protected/components/WebApplicationEndBehavior.php(32): CApplication->run()
27         // Attach the changeModulePaths event handler
28         // and raise it.
29         $this->onModuleCreate = array($this, 'changeModulePaths');
30         $this->onModuleCreate(new CEvent($this->owner));
31 
32         $this->owner->run(); // Run application.
33     }
34 
35     // This event should be raised when CWebApplication
36     // or CWebModule instances are being initialized.
37     public function onModuleCreate($event)
#11
+
 /home/u1493004/kolonrektum.com/index.php(22): CComponent->__call("runEnd", array("front"))
17         return parent::init();
18     }
19 }
20 
21 $app = new kraftCMS($config);
22 $app->runEnd('front');
23 
2024-03-29 07:58:01 LiteSpeed Yii Framework/1.1.21