0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00

Fix little PHP 4.4.0 bug involving return by reference.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1252 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-06-27 13:29:01 +00:00
parent 362c802191
commit 1e2abb7f8f

View File

@ -250,14 +250,16 @@ class HTMLPurifier_Config
* called before it's been setup, otherwise won't work.
*/
function &getHTMLDefinition($raw = false) {
return $this->getDefinition('HTML', $raw);
$def =& $this->getDefinition('HTML', $raw);
return $def; // prevent PHP 4.4.0 from complaining
}
/**
* Retrieves reference to the CSS definition
*/
function &getCSSDefinition($raw = false) {
return $this->getDefinition('CSS', $raw);
$def =& $this->getDefinition('CSS', $raw);
return $def;
}
/**
@ -306,7 +308,7 @@ class HTMLPurifier_Config
if (is_null($this->get($type, 'DefinitionID'))) {
// fatally error out if definition ID not set
trigger_error("Cannot retrieve raw version without specifying %$type.DefinitionID", E_USER_ERROR);
$false = false;
$false = new HTMLPurifier_Error();
return $false;
}
return $this->definitions[$type];