Skip to content

Commit 0cca53e

Browse files
committed
[zendframework#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.
1 parent 80c1ac4 commit 0cca53e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Xml/Security.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected static function heuristicScan($xml)
5151
* @param integer $errline
5252
* @return bool
5353
*/
54-
protected static function _loadXmlErrorHandler($errno, $errstr, $errfile, $errline)
54+
public static function loadXmlErrorHandler($errno, $errstr, $errfile, $errline)
5555
{
5656
if (substr_count($errstr, 'DOMDocument::loadXML()') > 0) {
5757
return true;
@@ -88,7 +88,7 @@ public static function scan($xml, DOMDocument $dom = null)
8888

8989
// Load XML with network access disabled (LIBXML_NONET)
9090
// error disabled with @ for PHP-FPM scenario
91-
set_error_handler(array('Zend_Xml_Security', '_loadXmlErrorHandler'), E_WARNING);
91+
set_error_handler(array('Zend_Xml_Security', 'loadXmlErrorHandler'), E_WARNING);
9292

9393
$result = $dom->loadXml($xml, LIBXML_NONET);
9494
restore_error_handler();

0 commit comments

Comments
 (0)