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

Request #3762 not serialize null object properties
Submitted: 2005-03-10 13:26 UTC
From: mark at mitchenall dot com Assigned: schst
Status: Closed Package: XML_Serializer
PHP Version: 4.3.10 OS: Any
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 : 26 + 33 = ?

 
 [2005-03-10 13:26 UTC] mark at mitchenall dot com
Description: ------------ It would be useful to have an option, e.g. ignoreNullProperties, which doesn't serialize an object property if it is NULL. Either that, or perhaps allow developers to define their own serialize methods in classes where elements need special handling. Maybe in a similar way to DB_DataObject and the 'validate' methods. Adding an ignoreNullProperties option I can add myself, if that's useful, and send the patch. The second method using custom serialize methods I haven't figured out the nicest way of implementing yet, so I wont comment too much on that.

Comments

 [2005-03-10 18:47 UTC] mark at mitchenall dot com
not sure what happened with the subject of this feature request, but it should be 'not serialize null object properties'
 [2005-03-25 17:32 UTC] schst
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.