note 115218 added to simplexmlelement.construct
| From: | bertolini dot cedric at me dot com | Date: | Mon, 16 Jun 2014 11:07:35 +0000 |
| Subject: | note 115218 added to simplexmlelement.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199685@lists.php.net to get a copy of this message | ||
It's worth noting that the behavior of SimpleXmlElement::__construct is not exactly the same as
simplexml_load_string, regarding libxml_use_internal_errors().
In my case,
<?php
libxml_use_internal_errors(true);
new \SimpleXmlElement($data);
?>
was still throwing error. But as soon as I switched to
<?php
libxml_use_internal_errors(true);
simplexml_load_string($data);
?>
everything worked fine and I stopped getting an error.
----
Server IP: 194.50.97.14
Probable Submitter: 134.54.0.9
----
Manual Page -- http://php.net/manual/en/simplexmlelement.construct.php
Edit -- https://master.php.net/note/edit/115218
Del: integrated -- https://master.php.net/note/delete/115218/integrated
Del: useless -- https://master.php.net/note/delete/115218/useless
Del: bad code -- https://master.php.net/note/delete/115218/bad+code
Del: spam -- https://master.php.net/note/delete/115218/spam
Del: non-english -- https://master.php.net/note/delete/115218/non-english
Del: in docs -- https://master.php.net/note/delete/115218/in+docs
Del: other reasons-- https://master.php.net/note/delete/115218
Reject -- https://master.php.net/note/reject/115218
Search -- https://master.php.net/manage/user-notes.php