PHP notice

Trying to get property of non-object

/var/www/ecomaks/data/www/ecomaks.ru/protected/controllers/frontend/PostsController.php(477)

465 
466     }
467 
468     public function actionCatalogElement()
469     {
470         $id_elem = 0;
471         if (isset($_GET['id_elem'])) {
472             $id_elem = $_GET['id_elem'];
473         }
474         if ($id_elem != 0) {
475             $catalog = new siteCatalog();
476             $elemInfo = $catalog->getElemById($id_elem);
477             $catalogInfo = Catalog_categorie::model()->findByPk($elemInfo->pid);
478             if ($elemInfo->title_seo != "") {
479                 $this->pageTitle = $elemInfo->title_seo;
480             } else {
481                 $this->pageTitle = $elemInfo->name;
482             }
483             if ($catalogInfo->title_seo != '') {
484                 $this->pageTitle .= ' - ' . $catalogInfo->title_seo;
485             } else {
486                 $this->pageTitle .= ' - ' . $catalogInfo->name;
487             }
488             $this->pageTitle .= ' - ' . Yii::app()->name;
489 

Stack Trace

#7
+
 /var/www/ecomaks/data/www/ecomaks.ru/protected/behaviors/WebApplicationEndBehavior.php(22): CApplication->run()
17         $this->_endName = $name;
18         
19         // обрабатываем событие создания модуля
20         $this->onModuleCreate = array($this, 'changeModulePaths');
21         $this->onModuleCreate(new CEvent ($this->owner));
22         $this->owner->run();        
23     }
24     
25     // обработчик события onModuleCreate
26     public function onModuleCreate($event)
27     {
#9
+
 /var/www/ecomaks/data/www/ecomaks.ru/index.php(12): CComponent->__call("runEnd", array("frontend"))
07 defined('YII_DEBUG') or define('YII_DEBUG', true);
08 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
09 // подключаем фреймворк
10 require_once($yii);
11 // стартуем приложение с помощью нашего WebApplicaitonEndBehavior, указав ему, что нужно загрузить фронтенд
12 Yii::createWebApplication($config)->runEnd('frontend');
2024-03-28 19:36:33 Apache/2.4.52 (Ubuntu) Yii Framework/1.1.14