Преглед изворни кода

[#293] Make new method public

- Since it's being invoked as a static callback, the method needs to be
  public. Renamed to remove the underscore prefix, and marked as public.
Matthew Weier O'Phinney пре 12 година
родитељ
комит
c675b9d742
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      library/Zend/Xml/Security.php

+ 2 - 2
library/Zend/Xml/Security.php

@@ -51,7 +51,7 @@ class Zend_Xml_Security
      * @param integer $errline
      * @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) {
             return true;
@@ -88,7 +88,7 @@ class Zend_Xml_Security
 
         // Load XML with network access disabled (LIBXML_NONET)
         // 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);
         restore_error_handler();