Re: Big problem with DB::isError!
| From: | Alan Knowles | Date: | Wed, 27 Aug 2003 13:02:14 +0000 |
| Subject: | Re: Big problem with DB::isError! | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20633@lists.php.net to get a copy of this message | ||
It's a db bug.
getAll() calls $db->query internally.
in getAll() it only checks for pear:error, then goes on to try and read the array.
- however modification queries always return DB_OK from $db->query - so you get a wrong type..
Regards
Alan
Tomas V.V.Cox wrote:
On Monday, August 18, 2003 14:18, Alan Knowles wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comit's not really urgently critical (getAll doesnt work with update/alter stuff. basically)I'm sure just tell the user to use $db->query() when they do modifications... rather than getAll()This can wait IMHO untill cox gets back to it..I guess that this problem was solved with the Greg commit to PEAR.php no? Tomas V.V.Coxnicos@php.net wrote:Hello, 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.-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com