Re: Big problem with DB::isError!
| From: | Joe Stump | Date: | Mon, 18 Aug 2003 13:17:20 +0000 |
| Subject: | Re: Big problem with DB::isError! | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19977@lists.php.net to get a copy of this message | ||
I've never had any problems. isError() should return TRUE if it's an error and FALSE if it is not an errors since the function appears to be posing the question "Is this class and Error?" if yes return TRUE if no then return false.
<?php
$result = $db->query($sql);
if(!DB::isError($result) && $result->numRows())
{
}
?>
--Joe
On Monday, August 18, 2003, at 07:10 AM, <nicos@php.net> wrote:
Hello,Joseph C. Stump http://www.joestump.net "How would this sentence be different if pi equaled 3?"It looks in every part of the code we use, if(DB::isError($res). But in fact isError returns FALSE in case of error so we should use !DB::isError or just change the behaviour of isError ? Very easy to verify it with the bug#25003... Very urgent, need feedback ! #25003. -- Regards. M.CHAILLAN Nicolas nicos@php.net www.WorldAKT.com Hébergement de sites internets. -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --