Bug #16609 [Ana->Csd]: Call to undefined method
| From: | till@php.net | Date: | Wed, 16 Sep 2009 14:18:02 +0000 |
| Subject: | Bug #16609 [Ana->Csd]: Call to undefined method | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1652@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16609&edit=1
ID: 16609
Updated by: till@php.net
Reported By: mick at deafzone dot ch
Summary: Call to undefined method
-Status: Analyzed
+Status: Closed
Type: Bug
Package: Mail_Queue
Package Version: 1.2.3
PHP Version: 5.3.0
Assigned To: till
-Roadmap Versions:
+Roadmap Versions: 1.2.4
New Comment:
-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.
Previous Comments:
------------------------------------------------------------------------
[2009-09-16 06:45:31] mick
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 02:43:45] doconnor
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 02:42:08] doconnor
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-15 12:28:42] till
-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-15 03:41:22] mick
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
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16609&edit=1