Bug #71627 [Opn->Fbk]: save function doesn't work baddly
Edit report at https://bugs.php.net/bug.php?id=71627&edit=1
ID: 71627
Updated by: ab@php.net
Reported by: dubois-holvoet dot patrick at neuf dot fr
Summary: save function doesn't work baddly
-Status: Open
+Status: Feedback
Type: Bug
Package: DOM XML related
Operating System: Windows 10
PHP Version: 5.5.32
Block user comment: N
Private report: N
New Comment:
Thanks for the report. Please post some reproduce code.
Cheers.
Previous Comments:
------------------------------------------------------------------------
[2016-02-18 19:11:10] dubois-holvoet dot patrick at neuf dot fr
Description:
------------
---
From manual page: http://www.php.net/domdocument.save
---
Here is the problem.
Before using DOMDocument to build a XML structure and save it in a file, I needed to serialize an
object witch has to be included in the XML structure.
But this object is from a class containing Protected members.
And as it's written in the PHP documentation the name of the protected members is prefixed by
the serialize function with an asterisc and a nul character on each side of the asterisc.
And these nul characters cause the bug with the DOMDocument::save function. The saved file is
troncated juste before the first nul character met.
Is there a solution to solve that ?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71627&edit=1
Thread (5 messages)