Skip to content

Commit

Permalink
Fix #1428
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Mar 27, 2017
1 parent 7c214da commit 48adadf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions kernels/ZendEngine3/object.c
Expand Up @@ -443,16 +443,16 @@ int zephir_read_property(zval *result, zval *object, const char *property_name,
}

ce = Z_OBJCE_P(object);
if (ce->parent) {
ce = zephir_lookup_class_ce(ce, property_name, property_length);
}

#if PHP_VERSION_ID >= 70100
old_scope = EG(fake_scope);
EG(fake_scope) = ce;
#else
old_scope = EG(scope);
EG(scope) = ce;
if (ce->parent) {
ce = zephir_lookup_class_ce(ce, property_name, property_length);
}
#endif

if (!Z_OBJ_HT_P(object)->read_property) {
Expand Down
2 changes: 1 addition & 1 deletion kernels/ZendEngine3/require.c
Expand Up @@ -79,7 +79,7 @@ int zephir_require_ret(zval *return_value_ptr, const char *require_path)
}

#if PHP_VERSION_ID >= 70100
new_op_array->scope = EG(fake_scope);
new_op_array->scope = EG(fake_scope) ? EG(fake_scope) : zend_get_executed_scope();
#else
new_op_array->scope = EG(scope);
#endif
Expand Down

0 comments on commit 48adadf

Please sign in to comment.