PHP notice

Trying to get property 'category_id' of non-object

/home/demirdo4/kombidunyasi.com/protected/modules/urun/controllers/front/DefaultController.php(133)

121         }
122         $new_array = array("success"=>$success,"total"=>$total,"items"=>array());
123         foreach($work as $item){
124             $new_array["items"][] = array("title"=> $item->title,"body"=>$item->body,"image"=>$item->image);
125         }
126         echo json_encode($new_array);
127 
128     }
129 
130     function actionShow($id) {
131         $this->layout = "//layouts/contentpages";
132         $urun = Urun::model()->dileGore()->findByAttributes(array('slug' => $id));
133         $urunler = Urun::model()->dileGore()->findAllByAttributes(array('category_id' => $urun->category_id));
134         $cat = UrunCategory::model()->findByAttributes(array('id'=>$urun->category_id));
135 
136         $this->pageTitle = $urun->title;
137         if(!empty($urun->category->parent->parent->parent->title)) { $this->breadcrumbs[$urun->category->parent->parent->parent->title] = '/urunler/kategori/'.$urun->category->parent->parent->parent->slug; };
138         if(!empty($urun->category->parent->parent->title)) { $this->breadcrumbs[$urun->category->parent->parent->title] = '/urunler/kategori/'.$urun->category->parent->parent->slug; };
139         if(!empty($urun->category->parent->title)) { $this->breadcrumbs[$urun->category->parent->title] = '/urunler/kategori/'.$urun->category->parent->slug;};
140         $this->breadcrumbs[$urun->category->title] = '/urunler/kategori/'.$urun->category->slug;
141         $this->breadcrumbs[$urun->title] = $urun->slug;
142 
143         if(!$urun)
144             throw new CHttpException(404,'Yazı Bulunamadı');
145         $this->render('show', array(

Stack Trace

#9
+
 /home/demirdo4/kombidunyasi.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/demirdo4/kombidunyasi.com/index.php(29): CComponent->__call("runEnd", array("front"))
24     }
25 
26 }
27 
28 $app = new WeberWebApp($config);
29 $app->runEnd('front');
30 
2024-03-28 10:47:51 LiteSpeed Yii Framework/1.1.13