diff options
author | Andreas Gohr <andi@splitbrain.org> | 2015-08-18 20:42:11 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2015-08-18 20:42:11 +0200 |
commit | bb6d40dcf2a7c8fde5be24560ee47fd566d2b201 (patch) | |
tree | bdd51af89122bb565e6db9faf2a0b76a87c24050 /inc/Form | |
parent | a453c16b3290eabdf35778c54498101c737544e1 (diff) | |
download | rpg-bb6d40dcf2a7c8fde5be24560ee47fd566d2b201.tar.gz rpg-bb6d40dcf2a7c8fde5be24560ee47fd566d2b201.tar.bz2 |
Form: fixed class checks
Diffstat (limited to 'inc/Form')
-rw-r--r-- | inc/Form/Form.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/Form/Form.php b/inc/Form/Form.php index 73b5b9cb3..7eaa53041 100644 --- a/inc/Form/Form.php +++ b/inc/Form/Form.php @@ -140,7 +140,7 @@ class Form extends Element { * @return Element */ public function addElement(Element $element, $pos = -1) { - if(is_a($element, '\dokuwiki\Form')) throw new \InvalidArgumentException('You can\'t add a form to a form'); + if(is_a($element, '\dokuwiki\Form\Form')) throw new \InvalidArgumentException('You can\'t add a form to a form'); if($pos < 0) { $this->elements[] = $element; } else { @@ -156,7 +156,7 @@ class Form extends Element { * @param $pos 0-based position of the element to replace */ public function replaceElement(Element $element, $pos) { - if(is_a($element, '\dokuwiki\Form')) throw new \InvalidArgumentException('You can\'t add a form to a form'); + if(is_a($element, '\dokuwiki\Form\Form')) throw new \InvalidArgumentException('You can\'t add a form to a form'); array_splice($this->elements, $pos, 1, array($element)); } |