PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Queue » Bug #2911

Using an invalid db account results in a call to undefined function

Details

Submitted2004-12-06 16:57 UTC
Frompatrick dot allaert at belgacom dot be
Assignedquipo
StatusClosed
PackageMail_Queue
PHP Version4.3.9
OSWindows 2000
Roadmaps(Not assigned)

Comments

[2004-12-06 16:57 UTC] patrick dot allaert at belgacom dot be

Description:
------------
Defining an invalid DB account to connect to the Mail Queue displays a bad fatal error in place of "unable to connect..."

Expected result:
----------------
I am expecting an error such as "Cannot connect to..." or "Invalid username/password for DB"

Actual result:
--------------
Fatal error: Call to undefined function: nextid() in c:\php\pear\Mail\Queue\Container\db.php on line 189

$id = $this->db->nextId($this->sequence);

$this->db is of type DB_Error

[2005-06-24 17:53 UTC] hoermann at simal dot de

Same problem here on Debian 3.1 with php 5.0.4.
if given a wrong username for db, the DB_Error Object should be returned or an PEAR_Error Object. At this time the Constructor call returns TRUE even if the database connection failed what makes it pretty hard to trackback the error to his source.

[2005-06-27 13:23 UTC] till at klimpong dot com

Same result on FreeBSD 4.11. ;) Even though this bug report helped me track the error.