Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+11 -2
View File
@@ -31,13 +31,22 @@ class _XMLReader extends \XMLReader
* @return bool
* @note We are disabling network access while loading the content to prevent XXE
*/
public function open( $uri, $encoding=NULL, $options=0 )
public static function safeOpen( $uri, $encoding=NULL, $options=0 )
{
if( $options === 0 )
{
$options = LIBXML_NONET;
}
return parent::open( $uri, $encoding, $options );
if( version_compare( PHP_VERSION, '8.0.0' ) >= 0 )
{
return parent::open( $uri, $encoding, $options );
}
else
{
$xml = new static;
$xml->open( $uri, $encoding, $options );
return $xml;
}
}
}