Error

Call to a member function getTitle() on null

/var/www/vhosts/halilhilmizade.com.tr/httpdocs/protected/modules/products/controllers/front/DefaultController.php(114)

102     $this->breadcrumbs[Yii::t("front","product")] = Yii::app()->baseUrl . '/urunler';
103     $this->breadcrumbs[Yii::t('front','firsat')] = Yii::app()->baseUrl . '/urunler/firsat/';
104     $this->render('firsat', array(
105         'products'   => $products
106     ));
107 }
108 function actionKategori($category,$sayfa=0) {
109 
110     $cat = ProductCategory::model()->findByAttributes(
111         array('slug' => $category)
112     );
113     $pusuruk = ProductCategory::model()->findAll();
114     $this->pageTitle = $cat->getTitle();
115     $this->breadcrumbs[Yii::t("front","product")] = Yii::app()->baseUrl . '/urunler';
116     $this->breadcrumbs[$cat->title] = Yii::app()->baseUrl . '/urunler/kategori/'.$cat->slug;
117 
118     $criteria=new CDbCriteria();
119     $criteria->condition = 'category_id=:id';
120     $criteria->params = array(':id'=>$cat->id);
121     $criteria->order = 't.order ASC, t.sku DESC';
122     $count=Product::model()->count($criteria);
123     $pages=new CPagination($count);
124 
125     // results per page
126     $pages->pageSize=9;

Stack Trace

#9
+
 /var/www/vhosts/halilhilmizade.com.tr/httpdocs/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/halilhilmizade.com.tr/httpdocs/index.php(26): CComponent->__call("runEnd", array("front"))
21         return parent::init();
22     }
23 }
24 //$_SERVER['HTTPS']='on';
25 $app = new kraftCMS($config);
26 $app->runEnd('front');
2024-03-19 08:14:35 Apache Yii Framework/1.1.19