mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Quarantine __autoload defs for PHP 7.2 compat
This commit is contained in:
parent
64baeda65c
commit
bb7ad66526
15
extras/HTMLPurifierExtras.autoload-legacy.php
Normal file
15
extras/HTMLPurifierExtras.autoload-legacy.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Legacy autoloader for systems lacking spl_autoload_register
|
||||||
|
*
|
||||||
|
* Must be separate to prevent deprecation warning on PHP 7.2
|
||||||
|
*/
|
||||||
|
|
||||||
|
function __autoload($class)
|
||||||
|
{
|
||||||
|
return HTMLPurifierExtras::autoload($class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// vim: et sw=4 sts=4
|
@ -17,10 +17,7 @@ if (function_exists('spl_autoload_register')) {
|
|||||||
spl_autoload_register('__autoload');
|
spl_autoload_register('__autoload');
|
||||||
}
|
}
|
||||||
} elseif (!function_exists('__autoload')) {
|
} elseif (!function_exists('__autoload')) {
|
||||||
function __autoload($class)
|
require dirname(__FILE__) . '/HTMLPurifierExtras.autoload-legacy.php';
|
||||||
{
|
|
||||||
return HTMLPurifierExtras::autoload($class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// vim: et sw=4 sts=4
|
// vim: et sw=4 sts=4
|
||||||
|
15
library/HTMLPurifier.autoload-legacy.php
Normal file
15
library/HTMLPurifier.autoload-legacy.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Legacy autoloader for systems lacking spl_autoload_register
|
||||||
|
*
|
||||||
|
* Must be separate to prevent deprecation warning on PHP 7.2
|
||||||
|
*/
|
||||||
|
|
||||||
|
function __autoload($class)
|
||||||
|
{
|
||||||
|
return HTMLPurifier_Bootstrap::autoload($class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// vim: et sw=4 sts=4
|
@ -14,10 +14,7 @@ if (function_exists('spl_autoload_register') && function_exists('spl_autoload_un
|
|||||||
spl_autoload_register('__autoload');
|
spl_autoload_register('__autoload');
|
||||||
}
|
}
|
||||||
} elseif (!function_exists('__autoload')) {
|
} elseif (!function_exists('__autoload')) {
|
||||||
function __autoload($class)
|
require dirname(__FILE__) . '/HTMLPurifier.autoload-legacy.php';
|
||||||
{
|
|
||||||
return HTMLPurifier_Bootstrap::autoload($class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ini_get('zend.ze1_compatibility_mode')) {
|
if (ini_get('zend.ze1_compatibility_mode')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user