summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-01-25 12:13:22 +0800
committerXinchen Hui <laruence@gmail.com>2016-01-25 12:13:22 +0800
commite7f2c5bd6ab047aa8b106bd3376f183fbf117d4d (patch)
treebc9912b26803dd1ac2f7858778a36cb36736fe58 /ext/standard/basic_functions.c
parentb68d525f16f5f966f8ac1b38effcd43a218eef4f (diff)
downloadphp-git-e7f2c5bd6ab047aa8b106bd3376f183fbf117d4d.tar.gz
Fixed bug #71442 (forward_static_call crash)
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index ad9cf1ce28..9c657a3d09 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4835,7 +4835,7 @@ PHP_FUNCTION(forward_static_call)
fci.retval = &retval;
called_scope = zend_get_called_scope(execute_data);
- if (called_scope &&
+ if (called_scope && fci_cache.calling_scope &&
instanceof_function(called_scope, fci_cache.calling_scope)) {
fci_cache.called_scope = called_scope;
}
@@ -4863,7 +4863,7 @@ PHP_FUNCTION(forward_static_call_array)
fci.retval = &retval;
called_scope = zend_get_called_scope(execute_data);
- if (called_scope &&
+ if (called_scope && fci_cache.calling_scope &&
instanceof_function(called_scope, fci_cache.calling_scope)) {
fci_cache.called_scope = called_scope;
}