Re: Q on PEAR error object and AUTH Package

From: Date: Tue, 02 Sep 2003 03:39:54 +0000
Subject: Re: Q on PEAR error object and AUTH Package
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7530@lists.php.net to get a copy of this message
Jswalter wrote:
I did this test... $bolRet = $objAuth->addUser( 'name3', 'name3' ); The first time this was run, I got a '1' and 'name3' was dropped into the DB, just fine. The second time I ran this same code, I got 'Object'. So, I did a
    echo print_r($bolRet)
and I got a lot (if you want to see it, I'll post it next time) OK, so I got some kind of Object, a PEAR error object by the docs. So my question is, how do I get this error info out of this PEAR error object?
Hi there, you can read up on the PEAR_Error object in the Core section of the manual at pear.php.net http://pear.php.net/manual/en/core.pear.pear-error.php basically, you want $bolRet->getMessage(); Regards, Greg

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