A misleading error message
| From: | Rick Fletcher | Date: | Thu, 13 May 2004 21:45:25 +0000 |
| Subject: | A misleading error message | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-9850@lists.php.net to get a copy of this message | ||
With 5RC2 the following code produces a the fatal error "Cannot instantiate
abstract class Two." In fact Two is not an abstract class, so the wording
tripped me up for a minute.
The error actually occurs because Two doesn't implement all of One's
abstract methods. Could someone make a change to the error message?
<?php
abstract class One {
abstract function foo();
abstract function bar();
}
class Two extends One {
public function foo() {}
}
new Two;
?>
--Rick