X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fdom-crawler%2FField%2FInputFormField.php;h=1c3c84d7217be166578ec5804f5ef614a241a0e1;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=090913efa36bd6f74e64fdbbc7a0cab89ea9ab60;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/dom-crawler/Field/InputFormField.php b/vendor/symfony/dom-crawler/Field/InputFormField.php index 090913efa..1c3c84d72 100644 --- a/vendor/symfony/dom-crawler/Field/InputFormField.php +++ b/vendor/symfony/dom-crawler/Field/InputFormField.php @@ -32,11 +32,12 @@ class InputFormField extends FormField throw new \LogicException(sprintf('An InputFormField can only be created from an input or button tag (%s given).', $this->node->nodeName)); } - if ('checkbox' === strtolower($this->node->getAttribute('type'))) { + $type = strtolower($this->node->getAttribute('type')); + if ('checkbox' === $type) { throw new \LogicException('Checkboxes should be instances of ChoiceFormField.'); } - if ('file' === strtolower($this->node->getAttribute('type'))) { + if ('file' === $type) { throw new \LogicException('File inputs should be instances of FileFormField.'); }