summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 7f0823af5a..a5256e7322 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -114,7 +114,8 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars
while (ex) {
if (ex->func && ZEND_USER_CODE(ex->func->common.type)) {
- if (ex->symbol_table == symtable1) {
+ if ((ZEND_CALL_INFO(ex) & ZEND_CALL_HAS_SYMBOL_TABLE)
+ && ex->symbol_table == symtable1) {
if (memcmp(var, "this", sizeof("this")-1) == 0) {
zend_throw_error(NULL, "Cannot re-assign $this");
zval_dtor(val);