Home » Database » MDB2 » Bug #5791
extended->getBeforeID() and ->getAfterID() don't allow $field to be empty
Details
| Submitted | 2005-10-27 10:31 UTC |
|---|---|
| From | tschlottke at virtualminds dot de |
| Assigned | lsmith |
| Status | Closed |
| Package | MDB2 |
| PHP Version | Irrelevant |
| OS | irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-10-27 10:31 UTC] tschlottke at virtualminds dot de
Description:
------------
Earlier versions of MDB2 (in which the two methods where not in the extended module), it was possible to leave $field blank, which is, looking at the code a possible/wanted thing.
...
"$seq = $table.(empty($field) ? '' : '_'.$field);"
...
Please change the Methods to
function getBeforeID($table, $field='', $ondemand = true)
and
function getAfterID($id, $table, $field='')
because php throws warnings otherwise.
Actual result:
--------------
PHP Warning: Missing argument 2 for MDB2_Extended::getBeforeID() in /usr/share/php/MDB2/Extended.php on line 562