PHP notice

Trying to get property of non-object

/home/admin/web/boileau-music.com/public_html/protected/controllers/SiteController.php(216)

204             if(!empty($slug2)){
205                 $parent = Page::model()->find("slug='".$slug2."' and lang_id=".$lang_id);
206                 $where="";
207                 if(!empty($parent)){
208                     $where = " and parent_id=".$parent["id"];
209                 }
210                 $page = Page::model()->find("slug='".$slug."' and lang_id=".$lang_id.$where);
211             }
212             $this->pageTitle = $page["title"].Yii::app()->params["title"];
213             //$this->descriptionWeb = $page["description_web"];
214             //$this->keywordsWeb = $page["description_web"];
215 
216             switch($page->module){
217                 case "prensa":
218                     $prensas = Press::model()->findAll(array("condition"=>"active=1 and lang_id=:lang_id","params"=>array(":lang_id"=>$lang_id),"order"=>"orden asc"));
219                     $datos = array("page"=>$page,"prensas"=>$prensas,"lang_id"=>$lang_id);
220                     break;
221                 case "fancybox":
222                     $datos = array("page"=>$page,"lang_id"=>$lang_id);
223                     $this->renderPartial("fancybox",$datos);
224                     exit();
225                     break;
226                 case "devoluciones":
227                     $datos = array("page"=>$page,"lang_id"=>$lang_id);
228                     $this->renderPartial("fancybox",$datos);

Stack Trace

#7
+
 /home/admin/web/boileau-music.com/public_html/index.php(24): CApplication->run()
19 defined('YII_DEBUG') or define('YII_DEBUG',true);
20 // specify how many levels of call stack should be shown in each log message
21 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
22 
23 require_once($yii);
24 Yii::createWebApplication($config)->run();
2024-03-19 12:56:52 Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1b Yii Framework/1.1.12