@@ -173,7 +173,7 @@ public static function exif_info() {
173173
174174
175175 public static function ImageTypeToMIMEtype ($ imagetype ) {
176- if (function_exists ('image_type_to_mime_type ' ) && ($ imagetype >= 1 ) && ($ imagetype <= 18 )) {
176+ if (function_exists ('image_type_to_mime_type ' ) && ($ imagetype >= 1 ) && ($ imagetype <= 19 )) {
177177 // PHP v4.3.0+
178178 return image_type_to_mime_type ($ imagetype );
179179 }
@@ -196,6 +196,7 @@ public static function ImageTypeToMIMEtype($imagetype) {
196196 16 => 'image/xbm ' , // IMAGETYPE_XBM
197197 17 => 'image/x-icon ' , // IMAGETYPE_ICO
198198 18 => 'image/webp ' , // IMAGETYPE_WEBP
199+ 19 => 'image/avif ' , // IMAGETYPE_AVIF
199200
200201 'gif ' => 'image/gif ' , // IMAGETYPE_GIF
201202 'jpg ' => 'image/jpeg ' , // IMAGETYPE_JPEG
@@ -204,6 +205,7 @@ public static function ImageTypeToMIMEtype($imagetype) {
204205 'bmp ' => 'image/bmp ' , // IMAGETYPE_BMP
205206 'ico ' => 'image/x-icon ' , // IMAGETYPE_ICO
206207 'webp ' => 'image/webp ' , // IMAGETYPE_WEBP
208+ 'avif ' => 'image/avif ' , // IMAGETYPE_AVIF
207209 );
208210
209211 return (isset ($ image_type_to_mime_type [$ imagetype ]) ? $ image_type_to_mime_type [$ imagetype ] : false );
@@ -1047,8 +1049,8 @@ function preg_quote($string, $delimiter='\\') {
10471049if (!function_exists ('file_get_contents ' )) {
10481050 // included in PHP v4.3.0+
10491051 function file_get_contents ($ filename ) {
1050- if (preg_match ('#^(f|ht)tp \://#i ' , $ filename )) {
1051- return SafeURLread ($ filename , $ error );
1052+ if (preg_match ('#^(ftp|https?) \://#i ' , $ filename )) {
1053+ return phpthumb_functions:: SafeURLread ($ filename , $ error );
10521054 }
10531055 if ($ fp = @fopen ($ filename , 'rb ' )) {
10541056 $ rawData = '' ;
0 commit comments