PHP notice

Trying to get property of non-object

/home/pyezbv0pv4z9/public_html/protected/views/post/view.php(4)

01 <h1><?php echo $model->blog->title; ?></h1>
02 <div class="view">
03     <?php if (!$model->anonymous):?>
04         <b><?php echo CHtml::encode($model->user->username); ?></b>,
05     <?php endif; ?>
06     <?php echo Yii::app()->format->datetime($model->create_time); ?>:
07     <p><?php echo nl2br(CHtml::encode($model->text)); ?></p>
08     <span class="translate"><?php echo CHtml::link('Translate', 'http://translate.google.ru/translate?hl=ru&sl=auto&tl=en&u='.urlencode($this->createAbsoluteUrl('post/view', array('id'=>$model->id))), array('encode'=>false)); ?></span>
09 </div>
10 <a href="javascript:history.back()"><?php echo Yii::t('i', 'Назад'); ?></a>

Stack Trace

#4
+
 /home/pyezbv0pv4z9/public_html/protected/controllers/PostController.php(26): CController->render("view", array("model" => Post))
21      */
22     public function actionView()
23     {
24         $this->render('view',array(
25             'model'=>$this->loadModel(),
26         ));
27     }
28 
29     /**
30      * Returns the data model based on the primary key given in the GET variable.
31      * If the data model is not found, an HTTP exception will be raised.
#12
+
 /home/pyezbv0pv4z9/public_html/index.php(12): CApplication->run()
07 // remove the following lines when in production mode
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
10 
11 require_once($yii);
12 Yii::createWebApplication($config)->run();
2024-03-28 14:09:26 Apache Yii Framework/1.1.10