Skip to content

Commit 97157b3

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
2 parents 3ec2281 + bf9ad4e commit 97157b3

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

ext/standard/image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static struct gfxinfo *php_handle_bmp (php_stream * stream TSRMLS_DC)
159159
result->width = (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]);
160160
result->height = (((unsigned int)dim[ 7]) << 8) + ((unsigned int) dim[ 6]);
161161
result->bits = ((unsigned int)dim[11]);
162-
} else if (size > 12 && (size <= 64 || size == 108)) {
162+
} else if (size > 12 && (size <= 64 || size == 108 || size == 124)) {
163163
result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo));
164164
result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]);
165165
result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigned int)dim[ 9]) << 8) + ((unsigned int) dim[ 8]);

ext/standard/tests/image/getimagesize.phpt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,22 @@ GetImageSize()
2323
var_dump($result);
2424
?>
2525
--EXPECT--
26-
array(11) {
26+
array(12) {
27+
["test1bpix.bmp"]=>
28+
array(6) {
29+
[0]=>
30+
int(500)
31+
[1]=>
32+
int(345)
33+
[2]=>
34+
int(6)
35+
[3]=>
36+
string(24) "width="500" height="345""
37+
["bits"]=>
38+
int(32)
39+
["mime"]=>
40+
string(14) "image/x-ms-bmp"
41+
}
2742
["test1pix.bmp"]=>
2843
array(6) {
2944
[0]=>

ext/standard/tests/image/image_type_to_mime_type.phpt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--TEST--
22
image_type_to_mime_type()
33
--SKIPIF--
4-
<?php
5-
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
4+
<?php
5+
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
66
require_once('skipif_imagetype.inc');
77
?>
88
--FILE--
@@ -25,7 +25,9 @@ image_type_to_mime_type()
2525
var_dump($result);
2626
?>
2727
--EXPECT--
28-
array(11) {
28+
array(12) {
29+
["test1bpix.bmp"]=>
30+
string(14) "image/x-ms-bmp"
2931
["test1pix.bmp"]=>
3032
string(14) "image/x-ms-bmp"
3133
["test1pix.jp2"]=>
@@ -48,4 +50,4 @@ array(11) {
4850
string(29) "application/x-shockwave-flash"
4951
["test4pix.tif"]=>
5052
string(10) "image/tiff"
51-
}
53+
}
674 KB
Binary file not shown.

0 commit comments

Comments
 (0)