Merge branch 'PHP-7.3' into PHP-7.4
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 7 Nov 2019 10:17:14 +0000 (11:17 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 7 Nov 2019 10:17:14 +0000 (11:17 +0100)
* PHP-7.3:
  Fixed bug #78759

1  2 
NEWS
ext/standard/array.c

diff --cc NEWS
index ae50a66bedc4ffab055c1af65937be6ff0ffd8c4,8d540d620a199d19e94d210c48b5018f14fab4e6..f0247cbead06e534c2326157c75fc490f2f7525b
--- 1/NEWS
--- 2/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)
index d44e5d50e741b6ac61bfffa3641f226365e8940c,300f71493238ef0b6e04fcaa2ee2a11488edb465..ec0890478a388bb32f7583d888fdbc53cb285e7f
@@@ -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;