1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-06 16:16:39 +02:00

must have @ before open images, warning contra notice, recoverable and non recoverable

This commit is contained in:
Mikael Roos
2014-08-21 02:13:01 +02:00
parent ef1d56085a
commit 2643d4954f
2 changed files with 4 additions and 4 deletions

View File

@@ -808,17 +808,17 @@ class CImage
switch ($this->fileExtension) {
case 'jpg':
case 'jpeg':
$this->image = imagecreatefromjpeg($this->pathToImage);
$this->image = @imagecreatefromjpeg($this->pathToImage);
$this->image or die("Fatal error when opening image.");
break;
case 'gif':
$this->image = imagecreatefromgif($this->pathToImage);
$this->image = @imagecreatefromgif($this->pathToImage);
$this->image or die("Fatal error when opening image.");
break;
case 'png':
$this->image = imagecreatefrompng($this->pathToImage);
$this->image = @imagecreatefrompng($this->pathToImage);
$this->image or die("Fatal error when opening image.");
$type = $this->getPngType();

View File

@@ -133,7 +133,7 @@ Revision history
v0.5.x (latest)
* Removed @ from opening images, better to display correct warning when failing #34.
* Removed @ from opening images, better to display correct warning when failing #34, but put it back again.
* Setting gd.jpeg_ignore_warning to true as default #34.
* `webroot/check_system.php` now outputs version of PHP and GD.
* #32 correctly send 404 header when serving an error message.