Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Commit

Permalink
[#293] Make new method public
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
weierophinney committed Mar 7, 2014
1 parent 9ef9d52 commit c675b9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Zend/Xml/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected static function heuristicScan($xml)
* @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;
Expand Down Expand Up @@ -88,7 +88,7 @@ public static function scan($xml, DOMDocument $dom = null)

// 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();
Expand Down

0 comments on commit c675b9d

Please sign in to comment.