Re: Optionally include a script
| From: | Helgi Þormar | Date: | Fri, 04 Nov 2005 15:05:17 +0000 |
| Subject: | Re: Optionally include a script | ||
| References: | 1 2 3 4 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-3230@lists.php.net to get a copy of this message | ||
On Thu, 03 Nov 2005 08:22:51 +0100, Lukas Smith wrote:
> Greg Beaver wrote:
>
>> This is just confusing. People equate PHP warnings with bugs (and they
>> should). If you see "file not found MDB2/mysql.php" followed by
>> "require_once failed" this is nowhere near to as clear as:
>> "MDB2 error: mysql driver (MDB2/mysql.php) not found - is the MDB2_mysql
>> package installed?"
>
> For this purpose MDB2 and LiveUser both have a userland implementation
> of a proper fileExists() method (and no internals does not think this is
> worthwhile) that checks the entire include path. This way I do not have
> to use @ cludges to provide a proper error messages. I just went in an
> tweaked the error messages in MDB2 and LiveUser will follow shortly if
> needed.
>
> BTW: this fileExits() implementation should probably be merged into
> PEAR.php ..
I've been told that we'll very likely have that in PEAR 1.5, and maybe
even loadClass :) (iirc the function had that name in MDB2 and LiveUser)
- Helgi