Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).

This commit is contained in:
Ilia Alshanetsky 2007-05-08 18:38:20 +00:00
parent eec0b67cd8
commit 75b5ce3b8d
2 changed files with 6 additions and 4 deletions

2
NEWS
View file

@ -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)

View 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 */