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

index d4f8ed0012830f650115f8badd135d72dd02ab2a,04aa3fee6e63cf380a0f5c2f58ffdbdc7865a1ad..9eb568b2eac63c68af41eea1f85289d28389c10a
@@@ -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_UNDEF(result);
++                      ZVAL_ERROR(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);
index 8c5ddf454a76dfc2fd6055850abe8487575a6256,09984390c90246c6209f15bb2e8781602f155dfd..3df9160180fa9729241d158b288113d9e7adf142
@@@ -1037,11 -1069,14 +1037,13 @@@ ZEND_API zval *zend_std_get_property_pt
                        /* Notice is thrown after creation of the property, to avoid EG(std_property_info)
                         * being overwritten in an error handler. */
                        if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
 -                              zend_error(E_NOTICE, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name));
 +                              zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name));
                        }
                }
+       } else if (zobj->ce->__get == NULL) {
+               retval = &EG(error_zval);
        }
  
 -      zend_tmp_string_release(tmp_name);
        return retval;
  }
  /* }}} */