another bug (?) in DB.php
| From: | Colin Viebrock | Date: | Wed, 18 Apr 2001 23:08:22 +0000 |
| Subject: | another bug (?) in DB.php | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-266@lists.php.net to get a copy of this message | ||
In the factory() and connect() methods, near the end, are:
@$obj =& new $classname;
If $classname doesn't exist -- because maybe you are stupid and typed
DB::factory('yoursql') -- then the script dies quietly with "Fatal error:
Cannot instantiate non-existent class: db_yoursql".
I guess the @ suppresses the error, but PHP dies on fatal errors,
regardless.
- Colin