mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-17 05:58:15 +01: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:
parent
fc06f221d5
commit
d6c4473a12
1
NEWS
1
NEWS
@ -15,6 +15,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
! DirectLex now preserves text in which a < bracket is followed by
|
! DirectLex now preserves text in which a < bracket is followed by
|
||||||
a non-alphanumeric character. This means that certain emoticons
|
a non-alphanumeric character. This means that certain emoticons
|
||||||
are now preserved.
|
are now preserved.
|
||||||
|
- Possibly fatal bug with __autoload() fixed in module manager
|
||||||
|
|
||||||
1.6.0, released 2007-04-01
|
1.6.0, released 2007-04-01
|
||||||
! Support for most common deprecated attributes via transformations:
|
! Support for most common deprecated attributes via transformations:
|
||||||
|
@ -206,17 +206,19 @@ class HTMLPurifier_HTMLModuleManager
|
|||||||
* @param $module Mixed: string module name, with or without
|
* @param $module Mixed: string module name, with or without
|
||||||
* HTMLPurifier_HTMLModule prefix, or instance of
|
* HTMLPurifier_HTMLModule prefix, or instance of
|
||||||
* subclass of HTMLPurifier_HTMLModule.
|
* subclass of HTMLPurifier_HTMLModule.
|
||||||
|
* @note This function will not call autoload, you must instantiate
|
||||||
|
* (and thus invoke) autoload outside the method.
|
||||||
*/
|
*/
|
||||||
function addModule($module) {
|
function addModule($module) {
|
||||||
if (is_string($module)) {
|
if (is_string($module)) {
|
||||||
$original_module = $module;
|
$original_module = $module;
|
||||||
if (!class_exists($module)) {
|
if (!class_exists($module, false)) {
|
||||||
foreach ($this->prefixes as $prefix) {
|
foreach ($this->prefixes as $prefix) {
|
||||||
$module = $prefix . $original_module;
|
$module = $prefix . $original_module;
|
||||||
if (class_exists($module)) break;
|
if (class_exists($module)) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!class_exists($module)) {
|
if (!class_exists($module, false)) {
|
||||||
trigger_error($original_module . ' module does not exist',
|
trigger_error($original_module . ' module does not exist',
|
||||||
E_USER_ERROR);
|
E_USER_ERROR);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user