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 » DB_ldap » Bug #5215

fetchRow does not return null anymore

Details

Submitted2005-08-26 20:24 UTC
Fromdeveloper at ckiweb dot com
Assigneddufuz
StatusClosed
PackageDB_ldap
PHP Version4.3.9
OSRHEL4
Roadmaps(Not assigned)

Comments

[2005-08-26 20:24 UTC] developer at ckiweb dot com

Description:
------------
In DB, fetchRow is supposed to return null when there are no more data. In DB_ldap, it is returning false when there is no more data. This is because in some upgrade, the line that checked for false or not was deleted, so the return value is not changed from false to null.

The lines to add are in the fetchRow at line 162. Just add:

if ($row === false) {
$row = null;
}

Test script:
---------------
Just call fetchRow on ldap.

Expected result:
----------------
It should return null when there is no data.

Actual result:
--------------
It returns false.