2008-01-21 18:43:59 +00:00
|
|
|
<?php
|
|
|
|
|
2008-02-17 18:21:45 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Convenience file that registers autoload handler for HTML Purifier.
|
2010-11-12 16:15:03 +00:00
|
|
|
* It also does some sanity checks.
|
2008-02-17 18:21:45 +00:00
|
|
|
*/
|
|
|
|
|
2008-02-18 02:33:50 +00:00
|
|
|
if (function_exists('spl_autoload_register') && function_exists('spl_autoload_unregister')) {
|
|
|
|
// We need unregister for our pre-registering functionality
|
2008-02-18 01:11:17 +00:00
|
|
|
HTMLPurifier_Bootstrap::registerAutoload();
|
2008-02-17 18:21:45 +00:00
|
|
|
if (function_exists('__autoload')) {
|
|
|
|
// Be polite and ensure that userland autoload gets retained
|
|
|
|
spl_autoload_register('__autoload');
|
|
|
|
}
|
2008-01-21 18:43:59 +00:00
|
|
|
} elseif (!function_exists('__autoload')) {
|
2017-12-28 06:55:16 +00:00
|
|
|
require dirname(__FILE__) . '/HTMLPurifier.autoload-legacy.php';
|
2008-01-21 18:43:59 +00:00
|
|
|
}
|
2008-12-06 09:24:59 +00:00
|
|
|
|
2020-09-16 00:12:43 +00:00
|
|
|
// phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.zend_ze1_compatibility_modeRemoved
|
2010-11-12 16:15:03 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|