diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index ce30b0ab26..2f0cbee06d 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -710,7 +710,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function hasAttribute($name) { - return isset($this->attributes[$name]); + return array_key_exists($name, $this->attributes); } /** @@ -723,7 +723,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function getAttribute($name, $default = null) { - return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } /** @@ -785,7 +785,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function hasOption($name) { - return isset($this->options[$name]); + return array_key_exists($name, $this->options); } /** @@ -798,7 +798,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function getOption($name, $default = null) { - return isset($this->options[$name]) ? $this->options[$name] : $default; + return array_key_exists($name, $this->options) ? $this->options[$name] : $default; } /** diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 7d297ed33d..c52b4169e8 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -392,7 +392,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function hasAttribute($name) { - return isset($this->attributes[$name]); + return array_key_exists($name, $this->attributes); } /** @@ -400,7 +400,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function getAttribute($name, $default = null) { - return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } /** @@ -448,7 +448,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function hasOption($name) { - return isset($this->options[$name]); + return array_key_exists($name, $this->options); } /** @@ -456,7 +456,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function getOption($name, $default = null) { - return isset($this->options[$name]) ? $this->options[$name] : $default; + return array_key_exists($name, $this->options) ? $this->options[$name] : $default; } /**