mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Merge branch 'PHP-5.5' into PHP-5.6
This commit is contained in:
commit
e09d3155a1
4
NEWS
4
NEWS
@ -15,8 +15,10 @@ PHP NEWS
|
||||
7/8/8.1/10 as "Business"). (Christian Wenz)
|
||||
. Fixed bug #69740 (finally in generator (yield) swallows exception in
|
||||
iteration). (Nikita)
|
||||
. Fixes bug #69835 (phpinfo() does not report many Windows SKUs).
|
||||
. Fixed bug #69835 (phpinfo() does not report many Windows SKUs).
|
||||
(Christian Wenz)
|
||||
. Fixed bug #69892 (Different arrays compare indentical due to integer key
|
||||
truncation). (Nikita)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #61221 (imagegammacorrect function loses alpha channel). (cmb)
|
||||
|
10
Zend/tests/bug69892.phpt
Normal file
10
Zend/tests/bug69892.phpt
Normal file
@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #69892: Different arrays compare indentical due to integer key truncation
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump([0 => 0] === [0x100000000 => 0]);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
@ -1446,11 +1446,10 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
|
||||
}
|
||||
if (ordered) {
|
||||
if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */
|
||||
result = p1->h - p2->h;
|
||||
if (result!=0) {
|
||||
if (p1->h != p2->h) {
|
||||
HASH_UNPROTECT_RECURSION(ht1);
|
||||
HASH_UNPROTECT_RECURSION(ht2);
|
||||
return result;
|
||||
return p1->h > p2->h ? 1 : -1;
|
||||
}
|
||||
} else { /* string indices */
|
||||
result = p1->nKeyLength - p2->nKeyLength;
|
||||
|
Loading…
Reference in New Issue
Block a user