Fix implementation of `TFormNode::hasAttribute()`
authorMatthias Schmidt <gravatronics@live.com>
Mon, 12 Mar 2018 18:39:01 +0000 (19:39 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 12 Mar 2018 18:39:01 +0000 (19:39 +0100)
See #2509

wcfsetup/install/files/lib/system/form/builder/TFormNode.class.php

index 743cd1411e3e3c25d5829e14469c1234e51d80a5..cc82f0d5a5b5ada651c9f3102db5655427c68475 100644 (file)
@@ -283,7 +283,7 @@ trait TFormNode {
        public function hasAttribute(string $name): bool {
                static::validateAttribute($name);
                
-               return array_search($name, $this->__attributes) !== false;
+               return isset($this->__attributes[$name]);
        }
        
        /**