mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fix #71848: getimagesize with $imageinfo returns false
This commit is contained in:
commit
e2285eb542
1
NEWS
1
NEWS
@ -41,6 +41,7 @@ PHP NEWS
|
||||
- Standard:
|
||||
. Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys).
|
||||
(Laruence)
|
||||
. Fixed bug #71848 (getimagesize with $imageinfo returns false). (cmb)
|
||||
|
||||
- ZIP:
|
||||
. Fixed bug #76461 (OPSYS_Z_CPM defined instead of OPSYS_CPM).
|
||||
|
@ -453,7 +453,7 @@ static int php_read_APP(php_stream * stream, unsigned int marker, zval *info)
|
||||
|
||||
buffer = emalloc(length);
|
||||
|
||||
if (php_stream_read(stream, buffer, (zend_long) length) <= 0) {
|
||||
if (php_stream_read(stream, buffer, (zend_long) length) != length) {
|
||||
efree(buffer);
|
||||
return 0;
|
||||
}
|
||||
|
BIN
ext/standard/tests/image/bug71848.jpg
Normal file
BIN
ext/standard/tests/image/bug71848.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 699 B |
32
ext/standard/tests/image/bug71848.phpt
Normal file
32
ext/standard/tests/image/bug71848.phpt
Normal file
@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #71848 (getimagesize with $imageinfo returns false)
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(getimagesize(__DIR__ . '/bug71848.jpg', $info));
|
||||
var_dump(array_keys($info));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
array(7) {
|
||||
[0]=>
|
||||
int(8)
|
||||
[1]=>
|
||||
int(8)
|
||||
[2]=>
|
||||
int(2)
|
||||
[3]=>
|
||||
string(20) "width="8" height="8""
|
||||
["bits"]=>
|
||||
int(8)
|
||||
["channels"]=>
|
||||
int(3)
|
||||
["mime"]=>
|
||||
string(10) "image/jpeg"
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(4) "APP0"
|
||||
[1]=>
|
||||
string(4) "APP5"
|
||||
}
|
||||
===DONE===
|
Loading…
Reference in New Issue
Block a user