Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / dom-crawler / Field / InputFormField.php
index 090913efa36bd6f74e64fdbbc7a0cab89ea9ab60..1c3c84d7217be166578ec5804f5ef614a241a0e1 100644 (file)
@@ -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.');
         }