X-Git-Url: https://git.mxchange.org/?p=quix0rs-gnu-social.git;a=blobdiff_plain;f=lib%2Fimagefile.php;h=d967af1d8c43b62b99176140088f8cca9511ed8d;hp=2d1a3af02efba2aa68f50ce796c9fa6d4078ae78;hb=abd90bbdf562614755802885dfb5673645df8575;hpb=e4a17fedc64b4519434ccec9262149bdb330d4af diff --git a/lib/imagefile.php b/lib/imagefile.php index 2d1a3af02e..d967af1d8c 100644 --- a/lib/imagefile.php +++ b/lib/imagefile.php @@ -76,13 +76,12 @@ class ImageFile $info = @getimagesize($this->filepath); - if (!( - ($info[2] == IMAGETYPE_GIF && function_exists('imagecreatefromgif')) || - ($info[2] == IMAGETYPE_JPEG && function_exists('imagecreatefromjpeg')) || - $info[2] == IMAGETYPE_BMP || - ($info[2] == IMAGETYPE_WBMP && function_exists('imagecreatefromwbmp')) || - ($info[2] == IMAGETYPE_XBM && function_exists('imagecreatefromxbm')) || - ($info[2] == IMAGETYPE_PNG && function_exists('imagecreatefrompng')))) { + if ( + ($info[2] == IMAGETYPE_GIF && !function_exists('imagecreatefromgif')) || + ($info[2] == IMAGETYPE_JPEG && !function_exists('imagecreatefromjpeg')) || + ($info[2] == IMAGETYPE_WBMP && !function_exists('imagecreatefromwbmp')) || + ($info[2] == IMAGETYPE_XBM && !function_exists('imagecreatefromxbm')) || + ($info[2] == IMAGETYPE_PNG && !function_exists('imagecreatefrompng'))) { // TRANS: Exception thrown when trying to upload an unsupported image file format. throw new UnsupportedMediaException(_('Unsupported image format.'), $this->filepath);