]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4' into PHP-8.0
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 12 Oct 2020 09:25:27 +0000 (11:25 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 12 Oct 2020 09:25:27 +0000 (11:25 +0200)
* PHP-7.4:
  Detect self-addition of array more accurately
  Deindirect source elements in zend_hash_merge

1  2 
Zend/zend_hash.c
Zend/zend_operators.c

Simple merge
index e7fb82e04fe46553662cd88f9c428d00d9620859,596581270b047098675dc13afe79c05b995a1a74..d1f2d553fceb1235ce5c6badf8de7b3fe1def5fe
@@@ -938,19 -932,9 +938,19 @@@ ZEND_API zend_string* ZEND_FASTCALL zva
  }
  /* }}} */
  
 +static ZEND_COLD zend_never_inline void ZEND_FASTCALL zend_binop_error(const char *operator, zval *op1, zval *op2) /* {{{ */ {
 +      if (EG(exception)) {
 +              return;
 +      }
 +
 +      zend_type_error("Unsupported operand types: %s %s %s",
 +              zend_zval_type_name(op1), operator, zend_zval_type_name(op2));
 +}
 +/* }}} */
 +
  static zend_never_inline void ZEND_FASTCALL add_function_array(zval *result, zval *op1, zval *op2) /* {{{ */
  {
-       if ((result == op1) && (result == op2)) {
+       if (result == op1 && Z_ARR_P(op1) == Z_ARR_P(op2)) {
                /* $a += $a */
                return;
        }