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)    

 [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.


 [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 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.