]> granicus.if.org Git - php/commitdiff
- Part 1 of #30126: Enhancement for error message for abstract classes
authorMarcus Boerger <helly@php.net>
Mon, 2 May 2005 15:55:05 +0000 (15:55 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 2 May 2005 15:55:05 +0000 (15:55 +0000)
Zend/zend_execute_API.c

index e49086acc75e8092fb32ca5323dbae254b6c3628..8d615e8785fe6809767853f19b638c245f3b5306 100644 (file)
@@ -1362,8 +1362,9 @@ void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC)
                zend_hash_apply_with_argument(&ce->function_table, (apply_func_arg_t) zend_verify_abstract_class_function, &ai TSRMLS_CC);
 
                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 ")", 
+                       zend_error(E_ERROR, "Class %s contains %d abstract method%s and must therefore be declared abstract (" MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT MAX_ABSTRACT_INFO_FMT ")", 
                                ce->name, ai.cnt, 
+                               ai.cnt > 1 ? "s" : "",
                                DISPLAY_ABSTRACT_FN(0),
                                DISPLAY_ABSTRACT_FN(1),
                                DISPLAY_ABSTRACT_FN(2)