mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 05:37:49 +02:00
[3.1.0] Implement more validators, add in missing DEFAULTs for many tests.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1626 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -36,7 +36,7 @@ class HTMLPurifier_VarParser
|
||||
*/
|
||||
final public function parse($var, $type, $allow_null = false) {
|
||||
if (!isset(HTMLPurifier_VarParser::$types[$type])) {
|
||||
throw new HTMLPurifier_VarParserException("Invalid type $type");
|
||||
throw new HTMLPurifier_VarParserException("Invalid type '$type'");
|
||||
}
|
||||
$var = $this->parseImplementation($var, $type, $allow_null);
|
||||
if ($allow_null && $var === null) return null;
|
||||
@@ -73,7 +73,7 @@ class HTMLPurifier_VarParser
|
||||
case 'mixed':
|
||||
return $var;
|
||||
default:
|
||||
$this->errorInconsistent(__CLASS__, $type);
|
||||
$this->errorInconsistent(get_class($this), $type);
|
||||
}
|
||||
$this->errorGeneric($var, $type);
|
||||
}
|
||||
|
Reference in New Issue
Block a user