Re: Comments on bugs marked bogus
| From: | Scott Mattocks | Date: | Tue, 26 Jul 2005 19:04:07 +0000 |
| Subject: | Re: Comments on bugs marked bogus | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38910@lists.php.net to get a copy of this message | ||
Alexey Borzov wrote:
BTW, the most obvious problem with brain-dead __autoload() implementation described by Scott in the bug report is the following. Consider: some package author would like to check for PEAR errors, but save the overhead of loading PEAR.php when there is no error, so he writes: if (is_a($returnValue, 'PEAR_Error')) {Now you are just being a jerk. You also aren't paying much attention to details. The implementation I provided uses include_once. The page will not die. It will just spit out a bunch of errors. The page will continue to load. Had I used require_once you may have a point, but since I am not brain-dead, I used include_once. You can read up on include_once here if you need to: http://us2.php.net/manual/en/function.include-once.php Also, a developer should not write the example you provided. They should be using PEAR::isError(). -- Scott Mattocks scott@crisscott.com http://www.crisscott.com http://pear.php.net/user/scottmattocks...} Now brain-dead __autoload() kicks in and immediately dies, for there is no PEAR/Error.php: PEAR_Error is defined in PEAR.php.