From: Tjerk Meesters Date: Wed, 30 Jul 2014 10:27:29 +0000 (+0800) Subject: Merge branch 'PHP-5.5' into PHP-5.6 X-Git-Tag: PRE_PHPNG_MERGE~42^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9258929201616750d418c629f7afdcfdab7dada;p=php 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 --- f9258929201616750d418c629f7afdcfdab7dada diff --cc NEWS index 6210033674,bc27f4e86e..70338ee750 --- 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 cbcaaf5b8b,b2e9a6f284..2792b86f02 --- 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; }