Re: Problem with /Mail/Queue/Container/db.php

From: Date: Sat, 06 Aug 2005 16:06:58 +0000
Subject: Re: Problem with /Mail/Queue/Container/db.php
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20302@lists.php.net to get a copy of this message
On 8/6/05, Ozer Tayiz <info@teknobilge.com> wrote: > Hi, > > >> I've installed the db.php as you > >> said, from the cvs. However, it still gives a "call to undefined > >> function" error, only line# and fn changed: > >> > >>> *Fatal error*: Call to undefined function: getrow() in > >>> */home/secretwl/public_html/fm/Mail/Queue/Container/db.php* on line > >>> *302* > >> > > > > I still believe there's a (lost?) connection problem. > > Who wrote the script didn't check for errors returned > > by Mail_Queue, so it dies while trying to call a PEAR::DB > > function (getRow) on a PEAR_Error object. > > If you have the script, add a few error checks after > > each method call: > > > > =========================== > > $res = $mail_queue->get(...); > > if (PEAR::isError($res)) { > > var_dump($res->getUserInfo()); > > exit; > > } > > =========================== > > as you suggested, I've added an error check after line 302, where the > error is reported. > > The code there is: > > > $row = $this->db->getRow($query, null, DB_FETCHMODE_ASSOC); > > if (PEAR::isError($row)) { > > var_dump($row->getUserInfo()); > > exit; > > } > No, you need to put it *before* that call and it needs to check $this->db. You should put it just after $this->db is set. -- Justin Patrin

« previous php.pear.general (#20302) next »