PHP notice

Trying to get property of non-object

/home/pyezbv0pv4z9/public_html/protected/views/post/_post.php(3)

01 <div class="view">
02     <?php if (!$data->anonymous && $data->user_id):?>
03         <b><?php echo CHtml::encode($data->user->username); ?></b>,
04     <?php endif; ?>
05     <span class="date"><?php echo Yii::app()->format->datetime($data->create_time); ?></span>
06     <p><?php echo nl2br(CHtml::encode($data->cuttedText)); ?>&nbsp;<span class="continue"><?php if($data->showMore) echo CHtml::link(Yii::t('i', 'читать дальше'), array('/post/view', 'id'=>$data->id)); ?></span></p>
07     <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'=>$data->id))), array('encode'=>false)); ?></span>
08 </div>
09 <div class="vin">
10     <img height="29" width="100" src="/img/vin22.png">
11 </div>

Stack Trace

#9
+
 /home/pyezbv0pv4z9/public_html/protected/views/blog/view.php(20): CBaseController->widget("zii.widgets.CListView", array("dataProvider" => CActiveDataProvider, "ajaxUpdate" => false, "itemView" => "application.views.post._post", "summaryText" => "Отображаются {start} - {end} элементов из..."))
15     $this->widget('zii.widgets.CListView', array(
16         'dataProvider'=>$data,
17         'ajaxUpdate'=>false,
18         'itemView'=>'application.views.post._post',
19         'summaryText'=>Yii::t('i', 'Отображаются {start} - {end} элементов из {count}'),
20     ));
21 ?>
22 <?php endif; ?>
#14
+
 /home/pyezbv0pv4z9/public_html/protected/controllers/BlogController.php(55): CController->render("view", array("blog" => Blog, "data" => CActiveDataProvider, "model" => Post))
50         }
51         $this->render('view',array(
52             'blog'=>$blog,
53             'data'=>$data,
54             'model'=>$model,
55         ));
56     }
57 
58     public function loadModel()
59     {
60         if($this->_model===null)
#22
+
 /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 23:41:26 Apache Yii Framework/1.1.10