mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Small fixes
This commit is contained in:
parent
fc10f20770
commit
3849fd02b4
9 changed files with 113 additions and 29 deletions
|
|
@ -1353,13 +1353,13 @@ class GD extends PHPThumb
|
|||
|
||||
switch ($this->format) {
|
||||
case 'GIF':
|
||||
$isCompatible = $gdInfo['GIF Create Support'];
|
||||
$isCompatible = isset($gdInfo['GIF Create Support']);
|
||||
break;
|
||||
case 'JPG':
|
||||
$isCompatible = (isset($gdInfo['JPG Support']) || isset($gdInfo['JPEG Support'])) ? true : false;
|
||||
break;
|
||||
case 'PNG':
|
||||
$isCompatible = $gdInfo[$this->format . ' Support'];
|
||||
$isCompatible = isset($gdInfo[$this->format . ' Support']);
|
||||
break;
|
||||
default:
|
||||
$isCompatible = false;
|
||||
|
|
@ -1367,7 +1367,7 @@ class GD extends PHPThumb
|
|||
|
||||
if (!$isCompatible) {
|
||||
// one last check for "JPEG" instead
|
||||
$isCompatible = $gdInfo['JPEG Support'];
|
||||
$isCompatible = isset($gdInfo['JPEG Support']);
|
||||
|
||||
if (!$isCompatible) {
|
||||
throw new \Exception("Your GD installation does not support {$this->format} image types");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue