PHP notice

Trying to get property 'id' of non-object

/var/www/vhosts/derinmotion.com/public_html/protected/modules/urunler/controllers/front/DefaultController.php(36)

24         $this->render('index', array(
25             'models' => $models,
26             'pages' => $pages
27         ));
28 
29     }
30 
31     function actionKategori ($slug) {
32         $UrunKat = UrunKategori::model()->findByAttributes(array('slug'=>$slug));
33         $cats = UrunKategori::model()->findAllByAttributes(array('parent_id'=>NULL,'language'=>Yii::app()->wbrLanguage->activeLanguage->id),array('order'=>'t.order asc'));
34 
35         $criteria=new CDbCriteria();
36         $criteria->condition = 'language='.Yii::app()->wbrLanguage->activeLanguage->id.' AND parent_id ='.$UrunKat->id;
37         $criteria->order = 't.order asc';
38         $count=UrunKategori::model()->count($criteria);
39         $pages=new CPagination($count);
40 
41         $pages->pageSize=900;
42         $pages->applyLimit($criteria);
43         $models=UrunKategori::model()->findAll($criteria);
44 
45         if (empty($models)){
46             $urunCr=new CDbCriteria();
47             $urunCr->condition = 'language='.Yii::app()->wbrLanguage->activeLanguage->id.' AND hide = 0 AND FIND_IN_SET('.$UrunKat->id.',category_id)';
48             $urunCr->order = 't.order asc';

Stack Trace

#9
+
 /var/www/vhosts/derinmotion.com/public_html/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
+
 /var/www/vhosts/derinmotion.com/public_html/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 00:02:05 Apache Yii Framework/1.1.26