diff options
author | Marcus Boerger <helly@php.net> | 2004-03-16 21:29:22 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2004-03-16 21:29:22 +0000 |
commit | cbaa43ff1282e35991e90daa566a14c35383a34a (patch) | |
tree | a6484c429d583fc6e5142f389c29af587d9b1c43 /Zend/zend_execute_API.c | |
parent | 1e8e284c6b4da59a58fcd0765e8d304842085b18 (diff) | |
download | php-git-cbaa43ff1282e35991e90daa566a14c35383a34a.tar.gz |
Fix SEGV in certain conditions while calling static methods
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 2a46150f58..9dcd2dbdec 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -645,13 +645,13 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS fci->object_pp = EG(This)?&EG(This):NULL; } else { zend_class_entry *scope; - scope = EG(active_op_array)->scope; + scope = EG(active_op_array) ? EG(active_op_array)->scope : NULL; found = zend_lookup_class(Z_STRVAL_PP(fci->object_pp), Z_STRLEN_PP(fci->object_pp), &ce TSRMLS_CC); if (found == FAILURE) { zend_error(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(fci->object_pp)); } - if (EG(This) && + if (scope && EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), scope TSRMLS_CC) && instanceof_function(scope, *ce TSRMLS_CC)) { fci->object_pp = &EG(This); |