|
@@ -51,7 +51,7 @@ class Zend_Xml_Security
|
|
|
* @param integer $errline
|
|
* @param integer $errline
|
|
|
* @return bool
|
|
* @return bool
|
|
|
*/
|
|
*/
|
|
|
- protected static function _loadXmlErrorHandler($errno, $errstr, $errfile, $errline)
|
|
|
|
|
|
|
+ public static function loadXmlErrorHandler($errno, $errstr, $errfile, $errline)
|
|
|
{
|
|
{
|
|
|
if (substr_count($errstr, 'DOMDocument::loadXML()') > 0) {
|
|
if (substr_count($errstr, 'DOMDocument::loadXML()') > 0) {
|
|
|
return true;
|
|
return true;
|
|
@@ -88,7 +88,7 @@ class Zend_Xml_Security
|
|
|
|
|
|
|
|
// Load XML with network access disabled (LIBXML_NONET)
|
|
// Load XML with network access disabled (LIBXML_NONET)
|
|
|
// error disabled with @ for PHP-FPM scenario
|
|
// error disabled with @ for PHP-FPM scenario
|
|
|
- set_error_handler(array('Zend_Xml_Security', '_loadXmlErrorHandler'), E_WARNING);
|
|
|
|
|
|
|
+ set_error_handler(array('Zend_Xml_Security', 'loadXmlErrorHandler'), E_WARNING);
|
|
|
|
|
|
|
|
$result = $dom->loadXml($xml, LIBXML_NONET);
|
|
$result = $dom->loadXml($xml, LIBXML_NONET);
|
|
|
restore_error_handler();
|
|
restore_error_handler();
|