CException

image file unreadable

/home/storage/3/77/60/diarioforense/public_html/protected/extensions/image/Image.php(91)

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

Stack Trace

#0
+
 /home/storage/3/77/60/diarioforense/public_html/protected/extensions/justintimer/EJustInTimeR.php(77): Image->__construct("/home/storage/3/77/60/diarioforense/public_html/protected/../ima...")
72                 
73                 $image->resize($this->mediumWidth, $this->mediumHeight);
74                 $image->save($this->mediumPath);
75                 
76             } else {
77                 $image = new Image($this->original);
78                 
79 
80                 $image->resize($this->cropWidth, $this->cropHeight);
81                 $image->save($this->cropPath);
82                 
#1
+
 /home/storage/3/77/60/diarioforense/public_html/protected/extensions/justintimer/EJustInTimeR.php(35): EJustInTimeR->createImagesIfNotExists()
30         
31         $this->basePath = Yii::app()->basePath.'/..';
32         $this->checkFolders();
33         $this->createUniqueName();
34         $this->initPathVars();
35         $this->createImagesIfNotExists();
36         $this->defineSrc();
37     }
38 
39     public function run() {
40         echo '<img src="' . $this->src . '" title="' . $this->getTitle() . '" alt="' . $this->getAlt() . '" class="' . $this->getClass() . '"/>';
#4
+
 /home/storage/3/77/60/diarioforense/public_html/protected/views/site/_noticia_interna.php(1): CBaseController->widget("ext.justintimer.EJustInTimeR", array("image" => "0a8abefa551138b6e646b9aa5d62caea.pdf", "alt" => "OAB divulga resultado preliminar da 2ª fase XVIII Exame de Orde...", "title" => "OAB divulga resultado preliminar da 2ª fase XVIII Exame de Orde...", "display" => "thumb", ...))
1 <?php if($index==0 || $index==5): ?><ul class="media-list col-lg-6"><?php endif; ?>    <li class="media">        <div class="media-left">            <a href="<?php echo Yii::app()->request->baseUrl; ?>/?r=site/noticia&id=<?php echo $data->id; ?>">                <?php if ($data->imagemTexto != null): ?>                    <?php                    $this->widget('ext.justintimer.EJustInTimeR', array(                        'image' => $data->imagemTexto,                        'alt' => $data->titulo,                        'title' => $data->titulo,                        'display' => 'thumb',                        'class' => 'media-object',                        'url' => '/images/uploaded/noticia/jitr',                    ));                    ?>                <?php else: ?>                    <?php if ($data->imagemGaleria != null): ?>                        <?php                        $this->widget('ext.justintimer.EJustInTimeR', array(                            'image' => $data->imagemGaleria,                            'alt' => $data->titulo,                            'title' => $data->titulo,                            'display' => 'thumb',                            'class' => 'media-object',                            'url' => '/images/uploaded/imagem/jitr',                        ));                        ?>                    <?php endif; ?>                <?php endif; ?>            </a>        </div>        <div class="media-body">            <a href="<?php echo Yii::app()->request->baseUrl; ?>/?r=site/noticia&id=<?php echo $data->id; ?>">                <h4 class="media-heading"><?php echo $data->titulo; ?></h4>                <p><?php echo (strlen($data->resumo)) > 170 ? substr($data->resumo, 0, 170) . '...' : $data->resumo; ?></p>            </a>        </div>    </li><?php if($index==4 || $index==9): ?></ul><?php endif; ?>
2024-03-28 14:52:37 Apache Yii Framework/1.1.13