diff options
author | Marcus Boerger <helly@php.net> | 2004-03-08 16:52:59 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2004-03-08 16:52:59 +0000 |
commit | c3b06ea21e12981f02f4da2ac0cb5d2499ff4bb5 (patch) | |
tree | b1bbd77e940088bbc280c7061135a75cc62c824b | |
parent | 6bfc0d06cf7858bb48d445003ec1d82f092bf8d2 (diff) | |
download | php-git-c3b06ea21e12981f02f4da2ac0cb5d2499ff4bb5.tar.gz |
Check count.
-rw-r--r-- | Zend/zend_execute_API.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 8c4c48c034..767583869a 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1229,13 +1229,15 @@ void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC) memset(&ai, 0, sizeof(ai)); zend_hash_apply_with_argument(&ce->function_table, (apply_func_arg_t) zend_verify_abstract_class_function, &ai TSRMLS_CC); - - zend_error(E_ERROR, "Class %s contains %d abstract methods and must therefore be declared abstract (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")", - ce->name, ai.cnt, - DISPLAY_ABSTRACT_FN(0), - DISPLAY_ABSTRACT_FN(1), - DISPLAY_ABSTRACT_FN(2) - ); + + if (ai.cnt) { + zend_error(E_ERROR, "Class %s contains %d abstract methods and must therefore be declared abstract (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")", + ce->name, ai.cnt, + DISPLAY_ABSTRACT_FN(0), + DISPLAY_ABSTRACT_FN(1), + DISPLAY_ABSTRACT_FN(2) + ); + } } } |