PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2 » Bug #5791

extended->getBeforeID() and ->getAfterID() don't allow $field to be empty

Details

Submitted2005-10-27 10:31 UTC
Fromtschlottke at virtualminds dot de
Assignedlsmith
StatusClosed
PackageMDB2
PHP VersionIrrelevant
OSirrelevant
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