summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_print.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-05-03 19:55:55 +0100
committerJakub Zelenka <bukka@php.net>2016-05-03 19:55:55 +0100
commitafb4062c2c66d3080c08693af47c670bb63c285e (patch)
tree4c860a31501a3dadf59c0b9322f7f52764ae75d3 /sapi/phpdbg/phpdbg_print.c
parent37048c0f6cef53b015c04c8370f94e6597588fdc (diff)
parent34a9882ad357620ccec2bfadba72fce027acd3d6 (diff)
downloadphp-git-afb4062c2c66d3080c08693af47c670bb63c285e.tar.gz
Merge branch 'json_parser_method' into json_parser_method_embed
Diffstat (limited to 'sapi/phpdbg/phpdbg_print.c')
-rw-r--r--sapi/phpdbg/phpdbg_print.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c
index 3725bf6083..034354a9e7 100644
--- a/sapi/phpdbg/phpdbg_print.c
+++ b/sapi/phpdbg/phpdbg_print.c
@@ -217,11 +217,13 @@ PHPDBG_PRINT(func) /* {{{ */
zend_string *lcname;
/* search active scope if begins with period */
if (func_name[0] == '.') {
- if (EG(scope)) {
+ zend_class_entry *scope = zend_get_executed_scope();
+
+ if (scope) {
func_name++;
func_name_len--;
- func_table = &EG(scope)->function_table;
+ func_table = &scope->function_table;
} else {
phpdbg_error("inactive", "type=\"noclasses\"", "No active class");
return SUCCESS;