summaryrefslogtreecommitdiff
path: root/inc/Form/Form.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-08-18 20:42:11 +0200
committerAndreas Gohr <andi@splitbrain.org>2015-08-18 20:42:11 +0200
commitbb6d40dcf2a7c8fde5be24560ee47fd566d2b201 (patch)
treebdd51af89122bb565e6db9faf2a0b76a87c24050 /inc/Form/Form.php
parenta453c16b3290eabdf35778c54498101c737544e1 (diff)
downloadrpg-bb6d40dcf2a7c8fde5be24560ee47fd566d2b201.tar.gz
rpg-bb6d40dcf2a7c8fde5be24560ee47fd566d2b201.tar.bz2
Form: fixed class checks
Diffstat (limited to 'inc/Form/Form.php')
-rw-r--r--inc/Form/Form.php4
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));
}