1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 20:58:11 +02:00

[3.1.0] Implemented redundant validators and tests

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1627 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-03-23 02:35:47 +00:00
parent 82c9a737f4
commit 77302f845f
6 changed files with 147 additions and 19 deletions

View File

@@ -32,7 +32,7 @@ class HTMLPurifier_ConfigSchema_Interchange
* Adds a directive array to $directives
*/
public function addDirective($directive) {
if (isset($this->directives[$i = $directive->id->__toString()])) {
if (isset($this->directives[$i = "{$directive->id}"])) {
throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'");
}
$this->directives[$i] = $directive;