Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.3

Bug #3925 "Undefined offset" Error!
Submitted: 2005-03-23 03:42 UTC
From: mvolkov at eol dot ca Assigned: quipo
Status: Closed Package: MDB_QueryTool
PHP Version: 4.3.10 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-23 03:42 UTC] mvolkov at eol dot ca
Description: ------------ The example provided with code gives an error: ---------------------------------------------------------- 1 - $user->get(3) In /usr/local/lib/php/MDB/QueryTool/Query.php, line: 1945 Undefined offset: 1 ------------------------------------------------------------ # Portion in "example.php" wich gave an error. // get a single entry with a given 'id' headline('$user->get(3)'); $user->reset(); // reset the query-builder, so no where, order, etc. are set $res = $user->get(3); myPrint($res); // query: SELECT * FROM user WHERE id=3 Reproduce code: --------------- Since the The lines 1944, 1945 in Query.php SHOULD READ: ------------------------------------------------------------ $limit = isset($query['limit']) ? $query['limit'] : $this->_limit; if (!$isCalledViaGetCount && @$limit) { // is there a count set? AND NOT: ------------------------------------------------------------ $limit = isset($query['limit']) ? $query['limit'] : $this->_limit; if (!$isCalledViaGetCount && @$limit[1]) { // is there a count set?

Comments

 [2005-03-25 21:33 UTC] quipo
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.