Home » Database » DB_ldap » Bug #5215
fetchRow does not return null anymore
Details
| Submitted | 2005-08-26 20:24 UTC |
|---|---|
| From | developer at ckiweb dot com |
| Assigned | dufuz |
| Status | Closed |
| Package | DB_ldap |
| PHP Version | 4.3.9 |
| OS | RHEL4 |
| 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.