Bug #16014 [Com]: Unserializer drops character entities.

From: Date: Mon, 16 Mar 2009 23:21:14 +0000
Subject: Bug #16014 [Com]: Unserializer drops character entities.
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-199@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=16014&edit=1 ID: 16014 Comment by: alex@malexmedia.net Reported By: alex at malexmedia dot net Summary: Unserializer drops character entities. Status: Open Type: Bug Package: XML_Serializer Operating System: Fedora 10 Package Version: 0.19.2 PHP Version: 5.2.5 Roadmap Versions: New Comment: Hmm, looks like I'm experiencing a funky bug in PHP and libxml2. Sorry for the chatter. Previous Comments: ------------------------------------------------------------------------ [2009-03-10 20:36:56] malexmedia Description: ------------ When unserializing an array previously serialized by XML Serializer, I expect my character entities to be restored to the reconstituted array. Instead, they are stripped. Please note, my actual PHP version is 5.2.6: [alex@amfedora01 node_upload]$ rpm --query php php-5.2.6-5.i386 [alex@amfedora01 node_upload]$ Test script: --------------- <?php require_once("XML/Serializer.php"); require_once("XML/Unserializer.php"); $orig = array(1, 'foo', 'key' => "Here's an apostrophe & an ampersand."); $serializer = new XML_Serializer(array('addDecl' => TRUE,'indent' => ' ','rootName' => 'test','typeHints' => TRUE,)); $serializer->serialize($orig); $stream = $serializer->getSerializedData(); $unserializer = new XML_Unserializer(); $unserializer->unserialize($stream); $result = $unserializer->getUnserializedData(); echo("The original array:\n"); print_r($orig); echo("\n\nThe serialized array:\n"); echo($stream . "\n\n"); echo("The unserialized array:\n"); print_r($result); Expected result: ---------------- I expect to see the same output from print_r($orig); as I do from print_r($result); Actual result: -------------- I do not see the same output from print_r($orig); as I do from print_r($result); ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=16014&edit=1

« previous php.pear.bugs (#199) next »