diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2016-04-01 16:17:49 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2016-04-01 16:17:49 +0300 |
| commit | 7abfaac901684da8bdcbccf43682a5557085c917 (patch) | |
| tree | 88c9d1a568c3638a070ea21247e8d0213f26d878 /Zend/zend_builtin_functions.c | |
| parent | c72282a13b12b7e572469eba7a7ce593d900a8a2 (diff) | |
| download | php-git-7abfaac901684da8bdcbccf43682a5557085c917.tar.gz | |
Merge zend_execute_data->called_scope into zend_execute_data->This.
"called_scope" made sense only for static method calls, for dynamic calls it was always equal to the class of $this.
Now EG(This) may store IS_OBJECT + $this or IS_UNUSED + "called_scope" (of course, "called_scope" may be NULL).
Some code might need to be adopted to support this change.
Checks (Z_OBJ(EX(This))) might need to be converted into (Z_TYPE(EX(This)) == IS_OBJECT).
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index a35c519c03..0cbafc7818 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -2433,7 +2433,7 @@ ZEND_FUNCTION(debug_print_backtrace) } /* $this may be passed into regular internal functions */ - object = Z_OBJ(call->This); + object = (Z_TYPE(call->This) == IS_OBJECT) ? Z_OBJ(call->This) : NULL; if (call->func) { func = call->func; @@ -2652,7 +2652,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int } /* $this may be passed into regular internal functions */ - object = call ? Z_OBJ(call->This) : NULL; + object = (call && (Z_TYPE(call->This) == IS_OBJECT)) ? Z_OBJ(call->This) : NULL; if (call && call->func) { func = call->func; |
