mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-09 16:56:20 +02:00
[1.6.1] Possibly fatal bug with __autoload() fixed in module manager
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@969 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@ -206,17 +206,19 @@ class HTMLPurifier_HTMLModuleManager
|
||||
* @param $module Mixed: string module name, with or without
|
||||
* HTMLPurifier_HTMLModule prefix, or instance of
|
||||
* subclass of HTMLPurifier_HTMLModule.
|
||||
* @note This function will not call autoload, you must instantiate
|
||||
* (and thus invoke) autoload outside the method.
|
||||
*/
|
||||
function addModule($module) {
|
||||
if (is_string($module)) {
|
||||
$original_module = $module;
|
||||
if (!class_exists($module)) {
|
||||
if (!class_exists($module, false)) {
|
||||
foreach ($this->prefixes as $prefix) {
|
||||
$module = $prefix . $original_module;
|
||||
if (class_exists($module)) break;
|
||||
}
|
||||
}
|
||||
if (!class_exists($module)) {
|
||||
if (!class_exists($module, false)) {
|
||||
trigger_error($original_module . ' module does not exist',
|
||||
E_USER_ERROR);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user