PHP notice

Trying to get property of non-object

/home/u0306176/public_html/protected/modules/products/controllers/front/DefaultController.php(129)

117             throw new CHttpException(404,'Kategori Bulunamadı');
118 
119         $this->pageTitle =$category->title;
120         $this->leftMenu = $this->leftMenu();
121 
122 
123         $this->render('category', array('category' => $category));
124     }
125 
126     function actionShow($id) {
127         
128         $product = Product::model()->findByAttributes(array('slug' => $id));
129         $category = ProductCategory::model()->findByAttributes(array('id' => $product->category_id));
130         $this->slug = $category->slug;
131 
132         $this->pageTitle =$product->title." - ".$category->title;
133         $this->leftMenuTitle = Yii::t('front','product');
134         $this->leftMenu = $this->leftMenu();
135         $this->render('show', array(
136             'product' => $product,
137             'category' => $product->category
138         ));
139     }
140     function actionNew($id) {
141 

Stack Trace

#9
+
 /home/u0306176/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)
#12
+
 /home/u0306176/public_html/index.php(30): CComponent->__call("runEnd", array("front"))
25     }
26 
27 }
28 
29 $app = new WeberWebApp($config);
30 $app->runEnd('front');
31 
32 //Yii::createWebApplication($config)->run();
#13
+
 /home/u0306176/public_html/index.php(30): WeberWebApp->runEnd("front")
25     }
26 
27 }
28 
29 $app = new WeberWebApp($config);
30 $app->runEnd('front');
31 
32 //Yii::createWebApplication($config)->run();
2024-03-29 13:41:49 LiteSpeed Yii Framework/1.1.13