Exception

Invalid image file

/home/u473758/tua.ru/www/protected/modules/images/components/CImageHandler.php(153)

141                     }
142                     else
143                     {
144                         throw new Exception('Invalid image png format');
145                     }
146                     break;
147                   default:
148                       throw new Exception('Not supported image format');
149               }
150           }
151           else
152           {
153               throw new Exception('Invalid image file');
154           }
155 
156 
157     }
158 
159     protected function initImage($image = false)
160     {
161         if($image === false)
162         {
163             $image = $this->originalImage;
164         }
165 

Stack Trace

#0
+
 /home/u473758/tua.ru/www/protected/modules/images/components/CImageHandler.php(184): CImageHandler->loadImage("/home/u473758/tua.ru/www/uploads/news/у.jpg")
179 
180     public function load($file)
181     {
182         $this->freeImage();
183 
184         if(($this->originalImage = $this->loadImage($file)))
185         {
186             $this->initImage();
187             $this->fileName = $file;
188 
189 
#1
+
 /home/u473758/tua.ru/www/protected/modules/news/models/NewsImage.php(44): CImageHandler->load("/home/u473758/tua.ru/www/uploads/news/у.jpg")
39         $fileName = 'thumb_'.$width.'x'.$height."_".$this->name;
40         if(file_exists($filePath)){
41             return $fileName;
42         } else {
43             $image = new CImageHandler();
44             if(file_exists($path.DIRECTORY_SEPARATOR.$this->name) && $image->load($path.DIRECTORY_SEPARATOR.$this->name)){
45                 $image->thumb($width, $height)
46                     ->save($filePath);
47                 return $fileName;
48             } else {
49                 return null;
#2
+
 /home/u473758/tua.ru/www/protected/modules/news/models/NewsImage.php(55): NewsImage->getThumb(400, 400)
50             }
51         }
52     }
53 
54     public function getFullThumbLink(){
55         $name = $this->getThumb(self::FULL_THUMB_WIDTH, self::FULL_THUMB_HEIGHT);
56         if($name !== null){
57             return Yii::app()->getBaseUrl().'/uploads/news/'.$name;
58         } else {
59             return null;
60         }
2024-03-28 23:47:03 Apache Yii Framework/1.1.15