CException

image file unreadable

/home/itip/web/bestactor.ru/public_html/app/extensions/image/Image.php(92)

080 
081         // Disable error reporting, to prevent PHP warnings
082         $ER = error_reporting(0);
083 
084         // Fetch the image size and mime type
085         $image_info = getimagesize($image);
086 
087         // Turn on error reporting again
088         error_reporting($ER);
089 
090         // Make sure that the image is readable and valid
091         if ( ! is_array($image_info) OR count($image_info) < 3)
092             throw new CException('image file unreadable');
093 
094         // Check to make sure the image type is allowed
095 //        if ( ! isset(Image::$allowed_types[$image_info[2]]))
096 //            throw new CException('image type not allowed');
097 
098         // Image has been validated, load it
099         $this->image = array
100         (
101             'file' => str_replace('\\', '/', realpath($image)),
102             'width' => $image_info[0],
103             'height' => $image_info[1],
104             'type' => $image_info[2],

Stack Trace

#0
+
 /home/itip/web/bestactor.ru/public_html/app/extensions/image/CImageComponent.php(41): Image->__construct()
36         $config = array(
37             'driver'=>$this->driver,
38             'params'=>$this->params,
39         );
40 
41         return new Image($image, $config);
42     }
43 }
44 ?>
#1
+
 /home/itip/web/bestactor.ru/public_html/app/models/User.php(329): CImageComponent->load()
324 
325                 if(!file_exists($thumbDirPath))
326                     @mkdir($thumbDirPath, 0777, true);
327 
328                 $sizes = explode('x', $size);
329                 $image = Yii::app()->image->load($sourcePath);
330                 $image->resize($sizes[0], $sizes[1])->quality(75);
331                 $image->save($thumbPath);
332             } else {
333                 $thumbUrl = Yii::app()->params['userAvatar']['defaultUrl'];
334             }
#2
+
 /home/itip/web/bestactor.ru/public_html/app/views/frontend/actor/_fans.php(23): User->getAvatar()
18         $limit = 16;
19     endif;
20     ?>
21     <?php foreach(ActorFans::model()->findAll($cr) as $key => $fanRef):?>
22         <li class="b-actor-fans b-actor-fans_user">
23             <?php echo CHtml::link(CHtml::image($fanRef->owner->getAvatar('40x40')), array('user/profile', 'id' => $fanRef->owner->id), array('title' => $fanRef->owner->username))?>
24         </li>
25     <?php endforeach;?>
26     <?php for($i = $key; $i < $limit; $i++):?>
27         <li class="b-actor-fans b-actor-fans_empty">
28             ?
2024-03-29 15:47:19 Apache/2.4.57 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1n Yii Framework/1.1.22