mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Don't define __autoload; rely on spl_autoload_register
Fixes #196 Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
parent
21e32042e9
commit
3d15f5253b
@ -7,7 +7,7 @@ if (!defined('HTMLPurifierTest')) {
|
|||||||
|
|
||||||
// setup our own autoload, checking for HTMLPurifier library if spl_autoload_register
|
// setup our own autoload, checking for HTMLPurifier library if spl_autoload_register
|
||||||
// is not allowed
|
// is not allowed
|
||||||
function __autoload($class)
|
function test_autoload($class)
|
||||||
{
|
{
|
||||||
if (!function_exists('spl_autoload_register')) {
|
if (!function_exists('spl_autoload_register')) {
|
||||||
if (HTMLPurifier_Bootstrap::autoload($class)) return true;
|
if (HTMLPurifier_Bootstrap::autoload($class)) return true;
|
||||||
@ -17,7 +17,7 @@ function __autoload($class)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (function_exists('spl_autoload_register')) {
|
if (function_exists('spl_autoload_register')) {
|
||||||
spl_autoload_register('__autoload');
|
spl_autoload_register('test_autoload');
|
||||||
}
|
}
|
||||||
|
|
||||||
// default settings (protect against register_globals)
|
// default settings (protect against register_globals)
|
||||||
|
Loading…
Reference in New Issue
Block a user