com php-src: Merge branch 'PHP-5.5' into PHP-5.6: NEWS ext/standard/array.c
| From: | Tjerk Anne Meesters | Date: | Wed, 30 Jul 2014 10:27:29 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.5' into PHP-5.6: NEWS ext/standard/array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79669@lists.php.net to get a copy of this message | ||
Commit: f9258929201616750d418c629f7afdcfdab7dada
Author: Tjerk Meesters <datibbaw@php.net> Wed, 30 Jul 2014 18:27:29 +0800
Parents: 8e13e502679fe6b8a1a8289d71b214684242e07e 52f4587e8a7a977909ea96c6ea9e27718d87b227
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f9258929201616750d418c629f7afdcfdab7dada
Log:
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Updated NEWS for #67693
Fixed bug #67693 - incorrect push to the empty array
Bugs:
https://bugs.php.net/67693
Changed paths:
MM NEWS
MM ext/standard/array.c
Diff:
diff --cc NEWS
index 6210033,bc27f4e..70338ee
--- a/NEWS
+++ b/NEWS
@@@ -1,10 -1,38 +1,13 @@@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2014, PHP 5.5.16
-
-- COM:
- . Fixed missing type checks in com_event_sink (Yussuf Khalil, Stas).
-
-- FPM:
- . Fixed bug #67635 (php links to systemd libraries without using pkg-config).
- (pacho@gentoo.org, Remi)
-
-- OpenSSL:
- . Fixed missing type checks in OpenSSL options (Yussuf Khalil, Stas).
-
-- readline:
- . Fixed bug #55496 (Interactive mode doesn't force a newline before the
- prompt). (Bob, Johannes)
- . Fixed bug #67496 (Save command history when exiting interactive shell
- with control-c). (Dmitry Saprykin, Johannes)
-
-- Sessions:
- . Fixed missing type checks in php_session_create_id (Yussuf Khalil, Stas).
+?? ??? 2014, PHP 5.6.0 Release Candidate 4
+ - Core:
+ . Fixed bug #67693 (incorrect push to the empty array) (Tjerk)
+
-24 Jul 2014, PHP 5.5.15
+31 Jul 2014, PHP 5.6.0 Release Candidate 3
- Core:
- . Fixed bug #67428 (header('Location: foo') will override a 308-399 response
- code). (Adam)
- . Fixed bug #67436 (Autoloader isn't called if two method definitions don't
- match). (Bob)
- . Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
- (Ferenc)
. Fixed bug #67497 (eval with parse error causes segmentation fault in
generator). (Nikita)
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
diff --cc ext/standard/array.c
index cbcaaf5,b2e9a6f..2792b86
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@@ -1892,8 -1967,25 +1892,8 @@@ static void _phpi_pop(INTERNAL_FUNCTION
/* If we did a shift... re-index like it did before */
if (!off_the_end) {
- unsigned int k = 0;
- int should_rehash = 0;
- Bucket *p = Z_ARRVAL_P(stack)->pListHead;
- while (p != NULL) {
- if (p->nKeyLength == 0) {
- if (p->h != k) {
- p->h = k++;
- should_rehash = 1;
- } else {
- k++;
- }
- }
- p = p->pListNext;
- }
- Z_ARRVAL_P(stack)->nNextFreeElement = k;
- if (should_rehash) {
- zend_hash_rehash(Z_ARRVAL_P(stack));
- }
+ zend_hash_reindex(Z_ARRVAL_P(stack), 1);
- } else if (!key_len && index >= Z_ARRVAL_P(stack)->nNextFreeElement - 1) {
+ } else if (!key_len && Z_ARRVAL_P(stack)->nNextFreeElement > 0 && index
>= Z_ARRVAL_P(stack)->nNextFreeElement - 1) {
Z_ARRVAL_P(stack)->nNextFreeElement = Z_ARRVAL_P(stack)->nNextFreeElement - 1;
}