]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 10 Oct 2019 12:44:53 +0000 (14:44 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 10 Oct 2019 12:44:53 +0000 (14:44 +0200)
1  2 
Zend/zend_execute.c

index e6edbf6685c5a33b9c02d252924977aaf9ad3695,368d6b2dcc8ba2150609b432f7709c2a3bdd0014..d4f8ed0012830f650115f8badd135d72dd02ab2a
@@@ -2584,7 -2706,7 +2584,7 @@@ static zend_never_inline zend_bool zend
                                }
                                if (!check_type_array_assignable(prop_info->type)) {
                                        zend_throw_auto_init_in_prop_error(prop_info, "array");
--                                      if (result) ZVAL_ERROR(result);
++                                      if (result) ZVAL_UNDEF(result);
                                        return 0;
                                }
                        }
                                if (Z_TYPE_P(ptr) == IS_UNDEF) {
                                        if (!ZEND_TYPE_ALLOW_NULL(prop_info->type)) {
                                                zend_throw_access_uninit_prop_by_ref_error(prop_info);
--                                              if (result) ZVAL_ERROR(result);
++                                              if (result) ZVAL_UNDEF(result);
                                                return 0;
                                        }
                                        ZVAL_NULL(ptr);
@@@ -2640,16 -2775,17 +2640,16 @@@ static zend_always_inline void zend_fet
                                return;
                        }
  
 -                      container = make_real_object(container, prop_ptr OPLINE_CC EXECUTE_DATA_CC);
 -                      if (UNEXPECTED(!container)) {
 -                              ZVAL_ERROR(result);
 -                              return;
 -                      }
 +                      zend_throw_non_object_error(container, prop_ptr OPLINE_CC EXECUTE_DATA_CC);
-                       ZVAL_ERROR(result);
++                      ZVAL_UNDEF(result);
 +                      return;
                } while (0);
        }
 +
 +      zobj = Z_OBJ_P(container);
        if (prop_op_type == IS_CONST &&
 -          EXPECTED(Z_OBJCE_P(container) == CACHED_PTR_EX(cache_slot))) {
 +          EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) {
                uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1);
 -              zend_object *zobj = Z_OBJ_P(container);
  
                if (EXPECTED(IS_VALID_PROPERTY_OFFSET(prop_offset))) {
                        ptr = OBJ_PROP(zobj, prop_offset);
@@@ -2728,8 -2858,7 +2728,7 @@@ static zend_always_inline void zend_ass
                variable_ptr = Z_INDIRECT_P(variable_ptr);
        }
  
-       /* variable_ptr may be ERROR if fetching the property threw an exception. */
-       if (UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
 -      if (UNEXPECTED(Z_ISERROR_P(variable_ptr) || EG(exception))) {
++      if (UNEXPECTED(EG(exception))) {
                variable_ptr = &EG(uninitialized_zval);
        } else if (UNEXPECTED(Z_TYPE(variable) != IS_INDIRECT)) {
                zend_throw_error(NULL, "Cannot assign by reference to overloaded object");