Home » Database » DB » Bug #3906
get*() should return an empty array instead of NULL
Details
| Request #3906 | get*() should return an empty array instead of NULL |
|---|---|
| Submitted | 2005-03-21 22:50 UTC |
| From | info at peter-thomassen dot de |
| Assigned | danielc |
| Status | Bogus |
| Package | DB |
| PHP Version | 5.0.3 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-03-21 22:50 UTC] info at peter-thomassen dot de
Description:
------------
When iterating through a resultset with foreach(), a PHP
warning is triggered if the resultset is empty, i.e. NULL.
This could be prevented by returning an empty array in
this case.
[2005-03-23 20:27 UTC] info at peter-thomassen dot de
Sorry, the DB functions work fine. I had a problem with
foreach($array) with $array being NULL. I thought that NULL
had been returned by a get*() function of DB because no
rows were returned by the DBMS, but I had modified the
array.
Sorry again, closing.