Error

Undefined class constant 'YEAR'

/var/www/html/framework/db/ar/CActiveRecord.php(145)

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

Stack Trace

#0
+
 /var/www/html/protected/models/CompareItem.php(113): CompareItem->getClientStringCookie()
108         return request()->cookies['client'];
109     }
110     
111     public function getItems() {
112         if (empty($this->_items)) {
113             $this->_items = self::model()->with('item:withDeleted')->findAllByAttributes(array('clientString' => $this->getClientStringCookie()->value));
114         }
115 
116         return $this->_items;
117     }
118     public static function item($itemId) {
#3
+
 /var/www/html/protected/controllers/CompareController.php(12): CActiveRecord->__get("items")
07         $this->breadcrumbs =array('Товары для сравнения');
08         $this->mainClass = 'catalog_page';
09         $model = new CompareItem;
10         $results=array();
11         $catalog=false;
12         if(count($model->items)){
13             foreach($model->items as $one){
14                 $results[$one->itemId]=$one->itemId;
15             }
16             $catalog=$model->parentCatalog;
17             if(!empty($catalog)){
#11
+
 /var/www/html/index.php(31): CApplication->run()
26 
27 $config = Configurator::buildConfig();
28 //CVarDumper::dump($config, 10, true);
29 $app = Yii::createWebApplication($config);
30 //$app->onEndRequest->add(array('Backup','ftpBackup'));
31 $app->run();
2024-03-29 09:38:25 Apache/2.4.25 (Debian) Yii Framework/1.1.15