Error

Unsupported operand types

/home/admin/web/serial-wod.ru/public_html/protected/models/GaleryImage.php(155)

143             ->where('t2.id > :id and t2.galery_category_id =:cat_id',array(':id'=>$id,':cat_id'=>$category))
144             ->order('t2.id asc')
145             ->limit(1)
146             ->queryRow();
147         $next = Yii::app()->db->createCommand()
148             ->select('t3.id as next_id')
149             ->from('galery_image as t3')
150             ->where('t3.id < :id and t3.galery_category_id =:cat_id',array(':id'=>$id,':cat_id'=>$category))
151             ->order('t3.id desc')
152             ->limit(1)
153             ->queryRow();
154         if($prev){
155             $image +=$prev;
156         }
157         if($next){
158             $image +=$next;
159         }
160       return $image;
161     }
162 }

Stack Trace

#0
+
 /home/admin/web/serial-wod.ru/public_html/protected/controllers/GaleryController.php(110): GaleryImage::getSingleImage("963", "26")
105     }
106     public function actionCategoryImage($id,$category)
107     {
108         $this->id = $category;
109         $model = GaleryCategory::model()->findByPk($category);
110         $image = GaleryImage::getSingleImage($id,$category);
111         $tags = GaleryImageTag::model()->findAllByAttributes(array('galery_image_id'=>(int)$id));
112 
113         if(!$model || !$image){
114             throw new CHttpException(404,'Images not found :(');
115         }
#15
+
 /home/admin/web/serial-wod.ru/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run(); 
2024-03-29 14:00:35 Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g Yii Framework/1.1.16