Home » Database » MDB_QueryTool » Bug #3925
"Undefined offset" Error!
Details
| 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) |
Comments
[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?