Skip to content

Commit

Permalink
[zendframework#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 80c1ac4 commit 0cca53e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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 0cca53e

Please sign in to comment.