CException

Не определено свойство "Auto.photo1".

/home/a/avto72com/old/framework/db/ar/CActiveRecord.php(143)

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

Stack Trace

#1
+
 /home/a/avto72com/old/public_html/protected/views/price/_list.php(14): CActiveRecord->__get("photo1")
09                 $price = CHtml::encode($data->price);
10                 $year = CHtml::encode($data->auto_year);
11                 $mileage = CHtml::encode($data->mileage);
12                 $bodycolor = CHtml::encode($data->bodycolors->bodycolor_name);
13                 $boxtype = CHtml::encode($data->boxtypes->boxtypes_name);
14                 $photo1 = CHtml::encode($data->photo1);
15                 if (trim($photo1) == '')
16                     $photo1 = 'images/nofoto.jpg';
17                 else
18                     $photo1 = 'http://www.avto72.com/auto_images/'.GetFileName($photo1).'_medium.'.GetFileType($photo1);
19                 $auto_name = CHtml::encode($data->brands->brands_name).' '.CHtml::encode($data->models->models_name);
#10
+
 /home/a/avto72com/old/public_html/protected/views/price/list.php(49): CBaseController->widget("zii.widgets.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "_list", "template" => "<td align="right">{pager}</td></tr></table><div style="height: 1...", "pager" => array("firstPageLabel" => "1 ...", "prevPageLabel" => "<<", "nextPageLabel" => ">>", "lastPageLabel" => "... 6", ...)))
44             'prevPageLabel'=>'&lt;&lt;',
45             'nextPageLabel'=>'&gt;&gt;',
46         ),
47         'summaryCssClass'=>'summary_my',
48 */    
49         ));
50     } else
51         echo '<div class="errorMsg">Ничего не найдено.</div>';
52 ?>
53 
54 
#14
+
 /home/a/avto72com/old/public_html/protected/controllers/PriceController.php(373): CController->renderPartial("list", array("dataProvider" => CActiveDataProvider, "config_model" => array(Config, Config, Config, Config), "query_arr" => array("default_arr" => array("order" => " date_add DESC, brands.brands_name, models.models_name, price"), "price_arr" => array("val" => "price", "flag" => false, "order" => " price", "order_type" => null, ...), "name_arr" => array("val" => "name", "flag" => true, "order" => " brands.brands_name, models.models_name, price", "order_type" => "&order=name", ...), "year_arr" => array("val" => "year", "flag" => false, "order" => " auto_year", "order_type" => null, ...), ...), "count_page" => "25", ...), true)
368                     foreach($arr as $view=>$data) {    
369     //                    $view = $this->path.'\\'.$view.'.php';
370     //            echo key($data);exit;
371                         if($this->beforeRender($view))
372                         {
373                             $output=$this->renderPartial($view,$data,true);
374                             $outputs .= $output;
375                         }
376                     }
377                 }
378             }
2024-03-28 21:01:30 Apache/2.4.29 Yii Framework/1.1.13