0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-18 18:25:18 +00: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:
Edward Z. Yang 2007-04-21 02:19:18 +00:00
parent fc06f221d5
commit d6c4473a12
2 changed files with 5 additions and 2 deletions

1
NEWS
View File

@ -15,6 +15,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
! DirectLex now preserves text in which a < bracket is followed by
a non-alphanumeric character. This means that certain emoticons
are now preserved.
- Possibly fatal bug with __autoload() fixed in module manager
1.6.0, released 2007-04-01
! Support for most common deprecated attributes via transformations:

View File

@ -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;