PHP Error

Trying to get property 'type_id' of non-object

/home/coastguard/public_html/protected/controllers/MainController.php(356)

344         }else{
345             $criteria_content_all->select = "t.id AS id,
346                                  cd_en.title AS title,
347                                  cd_en.subhead AS subhead,
348                                  cd_en.youtube AS youtube,
349                                  cd_en.videofile AS videofile,
350                                  cd_en.text AS text,
351                                  t.image AS image,
352                                  t.thumbnail AS thumbnail,
353                                  t.published AS published";
354             $criteria_content_all->join = 'LEFT JOIN content_detail as cd_en ON (cd_en.id = t.en_id)';
355         }
356         $criteria_content_all->condition = "t.type_id = '$content->type_id' AND published IS NOT NULL  AND t.id <> '$content->id' AND t.publisher_id IS NOT NULL";
357         $criteria_content_all->order = "published DESC LIMIT 0,4";
358         
359         $content_all = Content::model()->findAll($criteria_content_all);
360         
361         Yii::app()->user->setState('content_id', $content_id);
362         
363         $this->render('detail', array(
364             'content' => $content,
365             'content_all' => $content_all,
366                 )
367         );
368     }

Stack Trace

#9
+
 /home/coastguard/public_html/index.php(18): CApplication->run()
13 defined('YII_DEBUG') or define('YII_DEBUG',true);
14 // specify how many levels of call stack should be shown in each log message
15 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
19 ?>
20 
2024-03-29 14:23:36 Apache Yii Framework/1.1.8