From 1686dae8f509327fb9ec5d71295dd52fd1d19148 Mon Sep 17 00:00:00 2001 From: Ayrton Ricardo Date: Fri, 30 Sep 2016 22:59:43 -0300 Subject: [PATCH] Fix to restore error_handler before throw exception --- library/Zend/Config/Xml.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/Zend/Config/Xml.php b/library/Zend/Config/Xml.php index 4425a8b705..2c316c382b 100644 --- a/library/Zend/Config/Xml.php +++ b/library/Zend/Config/Xml.php @@ -106,12 +106,14 @@ public function __construct($xml, $section = null, $options = false) } else { try { if (!$config = Zend_Xml_Security::scanFile($xml)) { + restore_error_handler(); require_once 'Zend/Config/Exception.php'; throw new Zend_Config_Exception( "Error failed to load $xml file" ); } } catch (Zend_Xml_Exception $e) { + restore_error_handler(); require_once 'Zend/Config/Exception.php'; throw new Zend_Config_Exception( $e->getMessage()