diff options
author | Dmitry Stogov <dmitry@zend.com> | 2012-09-21 13:07:14 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2012-09-21 13:07:14 +0400 |
commit | 4db74b7f1981bf19805e815f983c50d93df2c26a (patch) | |
tree | 352a3e86012d4e57920b96e2cbdddc7b5c0cf383 /Zend/zend_API.c | |
parent | fd0b3ea663431b7adaedde11668fbc0b6ba07494 (diff) | |
download | php-git-4db74b7f1981bf19805e815f983c50d93df2c26a.tar.gz |
Fixed bug #63111 (is_callable() lies for abstract static method)
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index cf96743ee2..d529775764 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2603,7 +2603,14 @@ get_function_via_handler: if (retval) { if (fcc->calling_scope && !call_via_handler) { - if (!fcc->object_ptr && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) { + if (!fcc->object_ptr && (fcc->function_handler->common.fn_flags & ZEND_ACC_ABSTRACT)) { + if (error) { + zend_spprintf(error, 0, "cannot call abstract method %s::%s()", fcc->calling_scope->name, fcc->function_handler->common.function_name); + retval = 0; + } else { + zend_error(E_ERROR, "Cannot call abstract method %s::%s()", fcc->calling_scope->name, fcc->function_handler->common.function_name); + } + } else if (!fcc->object_ptr && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) { int severity; char *verb; if (fcc->function_handler->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { |