mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Issue-256: Fix PHP 7.3 compatibility issues update zend.ze1_compatibility_mode mode (#267)
This commit is contained in:
parent
4285590c90
commit
6aa4166b7e
@ -4,13 +4,11 @@
|
|||||||
* @file
|
* @file
|
||||||
* Legacy autoloader for systems lacking spl_autoload_register
|
* Legacy autoloader for systems lacking spl_autoload_register
|
||||||
*
|
*
|
||||||
* Must be separate to prevent deprecation warning on PHP 7.2
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function($class)
|
spl_autoload_register(function($class)
|
||||||
{
|
{
|
||||||
return HTMLPurifier_Bootstrap::autoload($class);
|
return HTMLPurifier_Bootstrap::autoload($class);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
// vim: et sw=4 sts=4
|
||||||
|
@ -17,6 +17,7 @@ if (function_exists('spl_autoload_register') && function_exists('spl_autoload_un
|
|||||||
require dirname(__FILE__) . '/HTMLPurifier.autoload-legacy.php';
|
require dirname(__FILE__) . '/HTMLPurifier.autoload-legacy.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.zend_ze1_compatibility_modeRemoved
|
||||||
if (ini_get('zend.ze1_compatibility_mode')) {
|
if (ini_get('zend.ze1_compatibility_mode')) {
|
||||||
trigger_error("HTML Purifier is not compatible with zend.ze1_compatibility_mode; please turn it off", E_USER_ERROR);
|
trigger_error("HTML Purifier is not compatible with zend.ze1_compatibility_mode; please turn it off", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user