mirror of
https://github.com/filp/whoops.git
synced 2026-08-31 12:38:10 +00:00
XmlResponseHandler: revert ze1 compatibility mode
This commit is contained in:
@@ -47,14 +47,18 @@ 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.
|
||||
if (ini_get('zend.ze1_compatibility_mode') == 1)
|
||||
{
|
||||
ini_set ('zend.ze1_compatibility_mode', 0);
|
||||
$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'?><$rootNodeName />");
|
||||
$xml = self::addDataToNode($node, $data)->asXML();
|
||||
|
||||
return self::addDataToNode($node, $data)->asXML();
|
||||
if ($compatibilityMode) {
|
||||
ini_set('zend.ze1_compatibility_mode', $compatibilityMode);
|
||||
}
|
||||
return $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user