Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Request #4431 add an option to toArray() to avoid empty fields
Submitted: 2005-05-25 14:59 UTC
From: garak Assigned:
Status: Closed Package: DB_DataObject
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    

 [2005-05-25 14:59 UTC] garak
Description: ------------ It could be useful is the toArray() method had an additional parameter to avoid returning empty fields. (a proposal of code is in the next section) Reproduce code: --------------- On line 3077 function toArray($format = '%s', $hideEmpty = false) Instead of line 3089, the following three lines if (!$hideEmpty) { $ret[sprintf($format,$k)] = ''; }


 [2005-06-04 02:00 UTC] alan_k
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.