|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30126 Enhancement for error message for abstract classes
Submitted: 2004-09-17 09:09 UTC Modified: 2005-05-02 18:14 UTC
From: Assigned: helly (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5.0.4 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2004-09-17 09:09 UTC]
When class 'B' extends another class 'A' which is declared abstract but does not implement all the methods, the error message is:

Fatal Error: Class B contains 1 abstract methods and must therefore be declared abstract (A::sampleMethod) in ....

Two things:
1) It would be nice to account for singularity of the word method if only one method is missing
2) It would be nice to also tell the user that he can also implement the remaining methods:

Fatal Error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::sampleMethod) in ....

Just sugar, but anyway ;)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-02 18:14 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Feb 03 08:05:55 2023 UTC