summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2012-09-21 14:18:37 +0400
committerDmitry Stogov <dmitry@zend.com>2012-09-21 14:18:37 +0400
commited3a2eec9c81687b09d9698887df67b498ca6ecf (patch)
treede98c586a4289b26837dce46ac8b4bcede8bb701 /Zend/zend_API.c
parentf037ddc85971496f985d0cea540129b9d928bb97 (diff)
parent4db74b7f1981bf19805e815f983c50d93df2c26a (diff)
downloadphp-git-ed3a2eec9c81687b09d9698887df67b498ca6ecf.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fixed bug #63111 (is_callable() lies for abstract static method) Conflicts: NEWS
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 3c9d59d692..45abcf61e8 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2813,7 +2813,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) {