diff options
author | Marcus Boerger <helly@php.net> | 2004-02-27 09:14:55 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2004-02-27 09:14:55 +0000 |
commit | f449c8fdf7f2d14572a798fdec5682d2dd487c99 (patch) | |
tree | b29f8ad830bc03f02b0ea0cb9113a98e016fca63 /Zend/zend_API.c | |
parent | 7c6b73ce38f2bdf259ba99bef3712d5c5f5803fc (diff) | |
download | php-git-f449c8fdf7f2d14572a798fdec5682d2dd487c99.tar.gz |
Fixes for abstract classes/methods
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ea5534ac51..a56c0c67ab 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1245,12 +1245,15 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr } else { internal_function->fn_flags = ZEND_ACC_PUBLIC; } - if (ptr->flags&ZEND_ACC_ABSTRACT) { + if (ptr->flags & ZEND_ACC_ABSTRACT) { if (scope) { - scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS; + scope->ce_flags |= ZEND_ACC_ABSTRACT; + if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) { + scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS; + } } } else { - if (scope && scope->ce_flags&ZEND_ACC_INTERFACE) { + if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) { zend_error(error_type, "Interface %s cannot contain non abstract method %s()", scope->name, ptr->fname); return FAILURE; } |