CException

Не определено свойство "ContactPerson.name_".

/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/views/frontoffice/contact/view.php(60): CActiveRecord->__get("name_")
55 <?php
56 foreach ($contactPerson as $k => $value) {
57     ?>
58     <li>
59         <p class="dir-name">
60             <?= $value->$name ?>
61         </p>
62         <p class="dir-post">
63             <?= $value->$title ?>
64         </p>
65     </li>
#6
+
 /var/www/rusbrand.dev/site/protected/controllers/frontoffice/ContactController.php(17): CController->render("view", array("contact" => Contact, "contactPerson" => array(ContactPerson, ContactPerson, ContactPerson, ContactPerson, ...)))
12 
13     public function actionView()
14     {
15         $contact = Contact::model()->findByPk(1);
16         $contactPerson = ContactPerson::model()->findAll();
17         $this->render('view', array('contact' => $contact, 'contactPerson' => $contactPerson));
18     }
19 
20     public function getMetaTitle()
21     {
22         $seo = Seo::model()->findByPk(7);
#11
+
 /var/www/rusbrand.dev/site/protected/components/WebAppWithShutdownHandler.php(200): CController->run("view")
195                     true
196                 );
197                 exit(0); // ...-три-четыре. ЗАКОНЧИЛИ! Переходим к водным процедурам
198             } else {
199                 // всё нормально пущай сам работает
200                 $controller->run($actionID);
201                 $this->setController($oldController);
202             }
203         } else {
204             throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
205                 array('{route}'=>$route===''?$this->defaultController:$route)));
2024-03-29 09:41:18 nginx/0.7.67 Yii Framework/1.1.12