From 2b81cb607e2c4dfdf022673a476057281dbf0668 Mon Sep 17 00:00:00 2001 From: hkvstore Date: Mon, 7 Mar 2022 14:12:34 +0800 Subject: [PATCH] Update GD.php --- src/PHPThumb/GD.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PHPThumb/GD.php b/src/PHPThumb/GD.php index f7ad1cc..db31a89 100644 --- a/src/PHPThumb/GD.php +++ b/src/PHPThumb/GD.php @@ -90,7 +90,7 @@ public function __construct($fileName, $options = array(), array $plugins = arra if (@$options['isDataStream'] && @$options['format']) { - $this->oldImage = imagecreatefromstring($fileName); + $this->oldImage = @imagecreatefromstring($fileName); $this->setFormat($options['format']); } else { @@ -100,16 +100,16 @@ public function __construct($fileName, $options = array(), array $plugins = arra switch ($this->format) { case 'GIF': - $this->oldImage = imagecreatefromgif($this->fileName); + $this->oldImage = @imagecreatefromgif($this->fileName); break; case 'JPG': - $this->oldImage = imagecreatefromjpeg($this->fileName); + $this->oldImage = @imagecreatefromjpeg($this->fileName); break; case 'PNG': - $this->oldImage = imagecreatefrompng($this->fileName); + $this->oldImage = @imagecreatefrompng($this->fileName); break; case 'STRING': - $this->oldImage = imagecreatefromstring($this->fileName); + $this->oldImage = @imagecreatefromstring($this->fileName); break; }