Skip to content

Commit

Permalink
Do not change scope for zephir_read_property
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Apr 23, 2020
1 parent b534cf9 commit b0f8ed5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernels/ZendEngine3/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ int zephir_read_property(zval *result, zval *object, const char *property_name,
return FAILURE;
}

ce = Z_OBJCE_P(object);
/* ce = Z_OBJCE_P(object);
if (ce->parent) {
ce = zephir_lookup_class_ce(ce, property_name, property_length);
Expand All @@ -497,7 +497,7 @@ int zephir_read_property(zval *result, zval *object, const char *property_name,
old_scope = EG(scope);
EG(scope) = ce;
#endif

*/
if (!Z_OBJ_HT_P(object)->read_property) {
const char *class_name;

Expand All @@ -515,12 +515,13 @@ int zephir_read_property(zval *result, zval *object, const char *property_name,
}

zval_ptr_dtor(&property);

/*
#if PHP_VERSION_ID >= 70100
EG(fake_scope) = old_scope;
#else
EG(scope) = old_scope;
#endif
*/
return SUCCESS;
}

Expand Down

0 comments on commit b0f8ed5

Please sign in to comment.