Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.7

Bug #16609 Call to undefined method
Submitted: 2009-09-15 07:41 UTC
From: mick Assigned: till
Status: Closed Package: Mail_Queue (version 1.2.3)
PHP Version: 5.3.0 OS:
Roadmaps: 1.2.4    
Subscription  


 [2009-09-15 07:41 UTC] mick (Michael Heuberger)
Description: ------------ Hi Sorry, but there is a bad bug, see line 367 in the container class db.php, there the method _checkConnection is called but it does not exist! Thanks for fixing it asap. Cheers Michael Actual result: -------------- [15-Sep-2009 03:30:01] PHP Fatal error: Call to undefined method Mail_Queue_Container_db::_checkConnection() in /home/httpd/vhosts/deafzone.ch/httpdocs/r/php/lib/pear/Mail/Queue/Container/db.php on line 367

Comments

 [2009-09-15 16:28 UTC] till (Till Klampaeckel)
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: till
Hi, we deprecated DB support, and DB itself has been deprecated for a long, long while. I suggest you switch to MDB2. Let me know, Till
 [2009-09-16 06:42 UTC] doconnor (Daniel O'Connor)
This got added in: Revision: 283110 Author: till Date: 8:09:59 PM, Tuesday, June 30, 2009 Message: * implemented getQueueCount() in db container (#15049) ---- Modified : /pear/packages/Mail_Queue/trunk/Queue/Container/db.php ... but _checkConnection() didn't make it.
 [2009-09-16 06:43 UTC] doconnor (Daniel O'Connor)
Ah, it's cut and paste from Request #15049 MDB2's version, which should be easy to translate // {{{ _checkConnection() /** * Check if there's a valid db connection * * @return boolean|PEAR_Error on error */ function _checkConnection() { if (!is_object($this->db) || !is_a($this->db, 'MDB2_Driver_Common')) { $msg = 'MDB2::connect failed'; if (PEAR::isError($this->db)) { $msg .= ': '.$this->db->getMessage(); } return new Mail_Queue_Error(MAILQUEUE_ERROR_CANNOT_CONNECT, $this->pearErrorMode, E_USER_ERROR, __FILE__, __LINE__, $msg); } return true; }
 [2009-09-16 10:45 UTC] mick (Michael Heuberger)
Thank you for all this but I've been working nonstop since yesterday, switching all my code to MDB2. And now the I found a new bug in the package when calling getQueueCount: MESSAGE: Undefined variable: row TYPE: Notice FILE: xxx/httpdocs/r/php/lib/pear/Mail/Queue/Container/mdb2.php LINE: 414 DEBUG INFO: 406 if (PEAR::isError($res)) { 407 return $res; 408 } 409 $query = 'SELECT count(*) FROM ' . $this->mail_table; 410 $count = $this->db->queryOne($query); 411 if (PEAR::isError($count)) { 412 return new Mail_Queue_Error(MAILQUEUE_ERROR_QUERY_FAILED, 413 $this->pearErrorMode, E_USER_ERROR, __FILE__, __LINE__, 414 'MDB2: query failed - "'.$query.'" - '.$row->getMessage()); 415 } 416 return (int) $count; 417 } 418 419 // }}} 420 // {{{ deleteMail() 421 422 /**
 [2009-09-16 19:18 UTC] till (Till Klampaeckel)
-Status: Analyzed +Status: Closed -Roadmap Versions: +Roadmap Versions: 1.2.4
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I believe both issues are fixed in r288376. Can you test both? Please re-open if it's not fixed.