PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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