]> granicus.if.org Git - php/commitdiff
Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 8 May 2007 18:38:20 +0000 (18:38 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 8 May 2007 18:38:20 +0000 (18:38 +0000)
NEWS
ext/standard/image.c

diff --git a/NEWS b/NEWS
index 6187f472432445f54dc4d065a0e1ec1aa8191303..652247e2d42d2bdd9c77f447f17798788e4f5165 100644 (file)
--- 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)
index 804f185cdf1f7deb76688b594b8d54091db11468..9e9592868688de3e4b7a827af0d0d8964b663535 100644 (file)
@@ -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 */