From: Ilia Alshanetsky Date: Tue, 8 May 2007 18:38:20 +0000 (+0000) Subject: Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE). X-Git-Tag: php-5.2.3RC1~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75b5ce3b8ddc035aefedab8ccc505d0ccbac003a;p=php Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE). --- diff --git a/NEWS b/NEWS index 6187f47243..652247e2d4 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS (Ilia) - Fixed altering $this via argument named "this". (Dmitry) - Fixed PHP CLI to use the php.ini from the binary location. (Hannes) +- Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE). + (Ilia) - Fixed bug #41304 (compress.zlib temp files left). (Dmitry) - Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no default post handler). (Ilia) diff --git a/ext/standard/image.c b/ext/standard/image.c index 804f185cdf..9e95928686 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1185,7 +1185,7 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC) if ( !filetype) filetype = tmp; if((php_stream_read(stream, filetype, 3)) != 3) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Read error!"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Read error!"); return IMAGE_FILETYPE_UNKNOWN; } @@ -1196,7 +1196,7 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC) return IMAGE_FILETYPE_JPEG; } else if (!memcmp(filetype, php_sig_png, 3)) { if (php_stream_read(stream, filetype+3, 5) != 5) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Read error!"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Read error!"); return IMAGE_FILETYPE_UNKNOWN; } if (!memcmp(filetype, php_sig_png, 8)) { @@ -1218,7 +1218,7 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC) } if (php_stream_read(stream, filetype+3, 1) != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Read error!"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Read error!"); return IMAGE_FILETYPE_UNKNOWN; } /* BYTES READ: 4 */ @@ -1233,7 +1233,7 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC) } if (php_stream_read(stream, filetype+4, 8) != 8) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Read error!"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Read error!"); return IMAGE_FILETYPE_UNKNOWN; } /* BYTES READ: 12 */