From: Nikita Popov Date: Thu, 7 Nov 2019 10:17:14 +0000 (+0100) Subject: Merge branch 'PHP-7.3' into PHP-7.4 X-Git-Tag: php-7.4.7RC1~519 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aed4f6e8492d64de10c540dc57a30a995163ac3e;p=php Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Fixed bug #78759 --- aed4f6e8492d64de10c540dc57a30a995163ac3e diff --cc NEWS index ae50a66bed,8d540d620a..f0247cbead --- a/NEWS +++ b/NEWS @@@ -1,26 -1,24 +1,27 @@@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 7.3.13 +?? ??? ????, PHP 7.4.0RC6 - Core: - . Fixed bug #78787 (Segfault with trait overriding inherited private shadow - property). (Nikita) + . Fixed bug #78768 (redefinition of typedef zend_property_info). (Nikita) + . Fixed bug #78788 (./configure generates invalid php_version.h). (max) - Standard: + . Fixed bug #77930 (stream_copy_to_stream should use mmap more often). + (Nikita) + . Fixed bug #78759 (array_search in $GLOBALS). (Nikita) -21 Nov 2019, PHP 7.3.12 +- OpenSSL: + . Fixed bug #78775 (TLS issues from HTTP request affecting other encrypted + connections). (Nikita) + +- Reflection: + . Fixed bug #78774 (ReflectionNamedType on Typed Properties Crash). (Nikita) + +31 Oct 2019, PHP 7.4.0RC5 - Core: - . Fixed bug #78658 (Memory corruption using Closure::bindTo). (Nikita) - . Fixed bug #78656 (Parse errors classified as highest log-level). (Erik - Lundin) - . Fixed bug #78752 (Segfault if GC triggered while generator stack frame is - being destroyed). (Nikita) - . Fixed bug #78689 (Closure::fromCallable() doesn't handle - [Closure, '__invoke']). (Nikita) + . Fixed bug #78226 (Unexpected __set behavior with typed properties). (Nikita) - COM: . Fixed bug #78694 (Appending to a variant array causes segfault). (cmb) diff --cc ext/standard/array.c index d44e5d50e7,300f714932..ec0890478a --- a/ext/standard/array.c +++ b/ext/standard/array.c @@@ -1557,42 -1563,24 +1557,42 @@@ static inline void php_search_array(INT ZEND_PARSE_PARAMETERS_END(); if (strict) { - ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(array), num_idx, str_idx, entry) { - ZVAL_DEREF(entry); - if (fast_is_identical_function(value, entry)) { - if (behavior == 0) { - RETURN_TRUE; - } else { - if (str_idx) { - RETVAL_STR_COPY(str_idx); + if (Z_TYPE_P(value) == IS_LONG) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_idx, str_idx, entry) { ++ ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(array), num_idx, str_idx, entry) { + ZVAL_DEREF(entry); + if (Z_TYPE_P(entry) == IS_LONG && Z_LVAL_P(entry) == Z_LVAL_P(value)) { + if (behavior == 0) { + RETURN_TRUE; } else { - RETVAL_LONG(num_idx); + if (str_idx) { + RETVAL_STR_COPY(str_idx); + } else { + RETVAL_LONG(num_idx); + } + return; } - return; } - } - } ZEND_HASH_FOREACH_END(); + } ZEND_HASH_FOREACH_END(); + } else { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_idx, str_idx, entry) { ++ ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(array), num_idx, str_idx, entry) { + ZVAL_DEREF(entry); + if (fast_is_identical_function(value, entry)) { + if (behavior == 0) { + RETURN_TRUE; + } else { + if (str_idx) { + RETVAL_STR_COPY(str_idx); + } else { + RETVAL_LONG(num_idx); + } + return; + } + } + } ZEND_HASH_FOREACH_END(); + } } else { if (Z_TYPE_P(value) == IS_LONG) { - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_idx, str_idx, entry) { + ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(array), num_idx, str_idx, entry) { if (fast_equal_check_long(value, entry)) { if (behavior == 0) { RETURN_TRUE;