mirror of
https://github.com/filp/whoops.git
synced 2026-08-30 20:17:11 +00:00
Clean up toXml
This commit is contained in:
@@ -98,18 +98,8 @@ class XmlResponseHandler extends Handler
|
||||
{
|
||||
assert('is_array($data) || $node instanceof Traversable');
|
||||
|
||||
// turn off compatibility mode as simple xml throws a wobbly if you don't.
|
||||
$compatibilityMode = ini_get('zend.ze1_compatibility_mode');
|
||||
if ($compatibilityMode) {
|
||||
ini_set('zend.ze1_compatibility_mode', 0);
|
||||
}
|
||||
|
||||
$node = simplexml_load_string("<?xml version='1.0' encoding='utf-8'?><root />");
|
||||
$xml = self::addDataToNode($node, $data)->asXML();
|
||||
|
||||
if ($compatibilityMode) {
|
||||
ini_set('zend.ze1_compatibility_mode', $compatibilityMode);
|
||||
}
|
||||
return $xml;
|
||||
return self::addDataToNode($node, $data)->asXML();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user