CException

Не определено свойство "News.title_".

/var/www/rusbrand.dev/yii/framework/db/ar/CActiveRecord.php(144)

132      */
133     public function __get($name)
134     {
135         if(isset($this->_attributes[$name]))
136             return $this->_attributes[$name];
137         else if(isset($this->getMetaData()->columns[$name]))
138             return null;
139         else if(isset($this->_related[$name]))
140             return $this->_related[$name];
141         else if(isset($this->getMetaData()->relations[$name]))
142             return $this->getRelated($name);
143         else
144             return parent::__get($name);
145     }
146 
147     /**
148      * PHP setter magic method.
149      * This method is overridden so that AR attributes can be accessed like properties.
150      * @param string $name property name
151      * @param mixed $value property value
152      */
153     public function __set($name,$value)
154     {
155         if($this->setAttribute($name,$value)===false)
156         {

Stack Trace

#1
+
 /var/www/rusbrand.dev/site/protected/components/views/WidgetNewsView.php(22): CActiveRecord->__get("title_")
17             /** @var $news News */
18             ?>
19             <li>
20                 <span class="libb-news-date"><?= Yii::app()->dateFormatter->format('dd.MM yyyy', $news->public_date); ?></span>
21                 <a href="<?= Yii::app()->createUrl('/news/'.$news->id) ?>" class="libb-news-text">
22                     <span><?= CHtml::encode($news->$title) ?></span>
23                 </a>
24             </li>
25             <?
26         }
27     }
#5
+
 /var/www/rusbrand.dev/site/protected/components/WidgetNews.php(41): CWidget->render("WidgetNewsView", array("newsList" => CPagination))
36 
37             )
38         );
39 //        return true;
40 
41         $this->render('WidgetNewsView', array('newsList' => $this->dataProvider->pagination));
42     }
43 }
#6
+
 /var/www/rusbrand.dev/site/protected/components/WidgetNews.php(9): WidgetNews->renderContent()
04     public $count;
05     public $dataProvider = null;
06 
07     public function run()
08     {
09         $this->renderContent();
10     }
11 
12     public function renderContent()
13     {
14         $pagination = new CPagination();
2024-03-29 14:15:13 nginx/0.7.67 Yii Framework/1.1.12