PHP notice

Trying to get property of non-object

/home/amix/lesnaperla_nowa/protected/controllers/PagesController.php(74)

62 
63     /**
64      * Displays a particular model.
65      * @param integer $id the ID of the model to be displayed
66      */
67     public function actionView($id) {
68         if(isset($_GET['print']))
69             $this->layout = '//layouts/print';
70         else
71             $this->layout = '//layouts/site';
72 
73         $model = Pages::model() -> page() -> findByAttributes(array('link' => $id));
74         if(!$model->photo)
75         {
76             $this->home=true;
77         }
78     /*    if($model->childs)
79         {
80             $this->redirect($model->childs[0]->link());
81         }*/
82         
83         
84         $this->active_id = $model->id;
85         $this->parent = $model->parent;    
86     

Stack Trace

#14
+
 /home/amix/lesnaperla_nowa/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-19 10:36:55 Apache Yii Framework/1.1.14