Skip to content

Commit 51f9a00

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.4.44
* PHP-5.4: Fixed bug #69892 Adjust Git-Rules
2 parents dda81f0 + 7fc0493 commit 51f9a00

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2015 PHP 5.4.44
44

5+
. Fixed bug #69892 (Different arrays compare indentical due to integer key
6+
truncation). (Nikita)
7+
58
09 Jul 2015 PHP 5.4.43
69

710
- Core:

README.GIT-RULES

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
1212
some basic rules with regards to Git usage will::
1313

1414
a. Make everybody happier, especially those responsible for maintaining
15-
Git itself.
15+
PHP itself.
1616

1717
b. Keep the changes consistently well documented and easily trackable.
1818

@@ -48,11 +48,11 @@ Currently we have the following branches in use::
4848
PHP-5.6 Is used to release the PHP 5.6.x series. This is a current
4949
stable version and is open for bugfixes only.
5050

51-
PHP-5.5 Is used to release the PHP 5.5.x series. This is a current
52-
stable version and is open for bugfixes only.
51+
PHP-5.5 Is used to release the PHP 5.5.x series. This is an old
52+
stable version and is open for security fixes only.
5353

54-
PHP-5.4 Is used to release the PHP 5.4.x series. This is a current
55-
stable version and is open for bugfixes only.
54+
PHP-5.4 Is used to release the PHP 5.4.x series. This is an old
55+
stable version and is open for security fixes only.
5656

5757
PHP-5.3 This branch is closed.
5858

@@ -67,7 +67,7 @@ Currently we have the following branches in use::
6767

6868
The next few rules are more of a technical nature::
6969

70-
1. All changes should first go to the lowest branch (i.e. 5.4) and then
70+
1. All changes should first go to the lowest branch (i.e. 5.6) and then
7171
get merged up to all other branches. If a change is not needed for
7272
later branches (i.e. fixes for features which where dropped from later
7373
branches) an empty merge should be done.

Zend/tests/bug69892.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
Bug #69892: Different arrays compare indentical due to integer key truncation
3+
--SKIPIF--
4+
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
5+
--FILE--
6+
<?php
7+
var_dump([0 => 0] === [0x100000000 => 0]);
8+
?>
9+
--EXPECT--
10+
bool(false)

Zend/zend_hash.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,11 +1513,10 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
15131513
}
15141514
if (ordered) {
15151515
if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */
1516-
result = p1->h - p2->h;
1517-
if (result!=0) {
1516+
if (p1->h != p2->h) {
15181517
HASH_UNPROTECT_RECURSION(ht1);
15191518
HASH_UNPROTECT_RECURSION(ht2);
1520-
return result;
1519+
return p1->h > p2->h ? 1 : -1;
15211520
}
15221521
} else { /* string indices */
15231522
result = p1->nKeyLength - p2->nKeyLength;

0 commit comments

Comments
 (0)