PHP warning

Creating default object from empty value

/home/html-02/motofan.sk/public_html/protected/controllers/FilesController.php(69)

57         $criteria->compare('bussines_type', DomainCodes::PHOTO_COMPETITION);
58 
59         $dataProvider = new CActiveDataProvider('Files', array(
60             'criteria' => $criteria,
61             'pagination' => false,
62         ));
63         $this->render('photoCompetition', array('dataProvider' => $dataProvider));
64     }
65 
66     public function actionViewPhoto($id, $type = NULL, $url = NULL) {
67         $image = Files::model()->findByPK($id);
68 
69         $image->view_counter = $image->view_counter + 1;
70         $image->saveAttributes(array('view_counter'));
71 
72         switch ($type) {
73             case DomainCodes::BIKER_PHOTO:
74                 $images = Files::model()->findAllByAttributes(array('bike_id' => $image->bike_id, 'bussines_type' => $type));
75                 break;
76             case DomainCodes::PHOTO_COMPETITION:
77                 $criteria = new CDbCriteria;
78                 $criteria->with = array('photoCompetion');
79                 $criteria->together = true;
80                 $criteria->compare('t.bussines_type', $type);
81                 $criteria->compare('photoCompetion.new', DomainCodes::NO);

Stack Trace

#7
+
 /home/html-02/motofan.sk/public_html/protected/components/ControllerBase.php(136): CFilterChain->run()
131 
132     public function filterthemeResolver($filterChain) {
133         if (!in_array(strtolower(Yii::app()->controller->action->id), array('forgottenpassword', 'login')) && !in_array(strtolower(Yii::app()->controller->action->id), $this->getAdminActions()))
134             Yii::app()->theme = Yii::app()->user->getShop()->getTheme();
135 
136         $filterChain->run();
137     }
138 
139     /*
140      * Check if user has permissions to view requested site
141      */
#10
+
 /home/html-02/motofan.sk/public_html/protected/components/ControllerBase.php(145): CFilterChain->run()
140      * Check if user has permissions to view requested site
141      */
142 
143     public function filtercheckAccess($filterChain) {
144         if (Yii::app()->user->isGuest || (!Yii::app()->user->isGuest && Yii::app()->user->getUser()->group_id == DomainCodes::SUPERADMIN)) {
145             $filterChain->run();
146             exit();
147         }
148         if (in_array(strtolower(Yii::app()->controller->action->id), $this->getAdminActions())) {
149             // Get permissions for loget user
150             $permissions = json_decode(Yii::app()->user->getUser()->group->permissions);
#13
+
 /home/html-02/motofan.sk/public_html/protected/components/ControllerBase.php(210): CFilterChain->run()
205             Yii::app()->user->logout(false);
206             Yii::app()->getSession()->add('shop', $shop);
207             $this->redirect(array('site/home'));
208         }
209         Yii::app()->getSession()->add('shop', $shop);
210         $filterChain->run();
211     }
212 
213     /**
214      * Returns a list of external action classes.
215      *
2024-03-28 17:01:38 Apache Yii Framework/1.1.15