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

Bug #19542 Serializer / XML with string Input
Submitted: 2012-08-03 14:33 UTC
From: jerryzz Assigned:
Status: Open Package: HTML_AJAX (version 0.5.6)
PHP Version: 5.2.5 OS: Linux
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 : 21 + 9 = ?

 
 [2012-08-03 14:33 UTC] jerryzz (Jerry)
Description: ------------ I'm building raw text XMLL When I set Serializer = XML, I have an error with the"saveXml()" method. Btw, it's normal, $input is not an XML DOMDocument object (but text) Test script: --------------- File Serializer/XML.php $input is a good formed XML text string Expected result: ---------------- Here is my correction: function serialize($input) { if(empty($input)) { return $input; } // we check for the dom extension elseif (extension_loaded('Dom')) { return (is_a($input, 'DOMDocument')) ? $input->saveXml() : $input; } // then will check for domxml elseif (extension_loaded('Domxml')) { return (is_a($input, 'Domxml')) ? $input->dump_mem(): $input; }

Comments