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:
@@ -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();
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user