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)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 22 + 48 = ?

 
 [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)] = ''; }

Comments

 [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 pear.php.net. In case this was a pear.php.net 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.