mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).
This commit is contained in:
parent
eec0b67cd8
commit
75b5ce3b8d
2 changed files with 6 additions and 4 deletions
2
NEWS
2
NEWS
|
@ -7,6 +7,8 @@ PHP NEWS
|
||||||
(Ilia)
|
(Ilia)
|
||||||
- Fixed altering $this via argument named "this". (Dmitry)
|
- Fixed altering $this via argument named "this". (Dmitry)
|
||||||
- Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
|
- 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 #41304 (compress.zlib temp files left). (Dmitry)
|
||||||
- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
|
- Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
|
||||||
default post handler). (Ilia)
|
default post handler). (Ilia)
|
||||||
|
|
|
@ -1185,7 +1185,7 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC)
|
||||||
|
|
||||||
if ( !filetype) filetype = tmp;
|
if ( !filetype) filetype = tmp;
|
||||||
if((php_stream_read(stream, filetype, 3)) != 3) {
|
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;
|
return IMAGE_FILETYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1196,7 +1196,7 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC)
|
||||||
return IMAGE_FILETYPE_JPEG;
|
return IMAGE_FILETYPE_JPEG;
|
||||||
} else if (!memcmp(filetype, php_sig_png, 3)) {
|
} else if (!memcmp(filetype, php_sig_png, 3)) {
|
||||||
if (php_stream_read(stream, filetype+3, 5) != 5) {
|
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;
|
return IMAGE_FILETYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
if (!memcmp(filetype, php_sig_png, 8)) {
|
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) {
|
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;
|
return IMAGE_FILETYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
/* BYTES READ: 4 */
|
/* 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) {
|
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;
|
return IMAGE_FILETYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
/* BYTES READ: 12 */
|
/* BYTES READ: 12 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue