Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
immortalist
/
wp-content
/
plugins
/
tenweb-speed-optimizer
/
vendor
/
imangazaliev
/
didom
/
src
/
DiDom
:
Errors.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php declare(strict_types=1); namespace DiDom; class Errors { /** * @var bool */ protected static $internalErrors; /** * @var bool */ protected static $disableEntities; /** * Disable error reporting. */ public static function disable() { self::$internalErrors = libxml_use_internal_errors(true); if (\LIBXML_VERSION < 20900) { self::$disableEntities = libxml_disable_entity_loader(true); } } /** * Restore error reporting. * * @param bool $clear */ public static function restore($clear = true) { if ($clear) { libxml_clear_errors(); } libxml_use_internal_errors(self::$internalErrors); if (\LIBXML_VERSION < 20900) { libxml_disable_entity_loader(self::$disableEntities); } } }