CException

Не определено свойство "StructCategory.registration".

/var/www/vhosts/kcp.kz/yii/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
+
 /var/www/vhosts/kcp.kz/httpdocs/protected/modules/struct/models/StructCategory.php(911): CActiveRecord->__get("registration")
906                 return isset($this->data[$name])
907                     ? $this->data[$name] : NULL;
908             }
909         }
910 
911         return parent::__get($name);
912     }
913 
914     public function getAttribute($name)
915     {
916         // если не сделать этого, произойдет ситуация, когда обращение
#2
+
 /var/www/vhosts/kcp.kz/httpdocs/protected/views/templates/purchase/template.php(42): StructCategory->__get("registration")
37 $purchase = Yii::app()->struct->getCategory('purchase');
38 $category = $this->category;
39 $parent     = $this->category->parent;
40 
41 //Обязательная регистрация
42 if($category->registration && !isset(Yii::app()->request->cookies['username'])){
43     Yii::app()->user->returnUrl = $parent->createUrl();
44     $registration = Yii::app()->custom->getCategories('registration');
45     $regUrl = '/registration/login';
46     $this->redirect($regUrl);
47 }
#3
+
 /var/www/vhosts/kcp.kz/httpdocs/protected/views/category.php(10): include("/var/www/vhosts/kcp.kz/httpdocs/protected/views/templates/purcha...")
05 
06 // подгрузка шаблона
07 include Yii::app()->struct->getTemplatePath(
08     'category',
09     Yii::app()->struct->currentTemplate
10 );
2024-03-19 16:05:19 Apache Yii Framework/1.1.13