Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dom-crawler/Field/InputFormField.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
12:7a779792577d | 13:5fb285c0d0e3 |
---|---|
30 { | 30 { |
31 if ('input' !== $this->node->nodeName && 'button' !== $this->node->nodeName) { | 31 if ('input' !== $this->node->nodeName && 'button' !== $this->node->nodeName) { |
32 throw new \LogicException(sprintf('An InputFormField can only be created from an input or button tag (%s given).', $this->node->nodeName)); | 32 throw new \LogicException(sprintf('An InputFormField can only be created from an input or button tag (%s given).', $this->node->nodeName)); |
33 } | 33 } |
34 | 34 |
35 if ('checkbox' === strtolower($this->node->getAttribute('type'))) { | 35 $type = strtolower($this->node->getAttribute('type')); |
36 if ('checkbox' === $type) { | |
36 throw new \LogicException('Checkboxes should be instances of ChoiceFormField.'); | 37 throw new \LogicException('Checkboxes should be instances of ChoiceFormField.'); |
37 } | 38 } |
38 | 39 |
39 if ('file' === strtolower($this->node->getAttribute('type'))) { | 40 if ('file' === $type) { |
40 throw new \LogicException('File inputs should be instances of FileFormField.'); | 41 throw new \LogicException('File inputs should be instances of FileFormField.'); |
41 } | 42 } |
42 | 43 |
43 $this->value = $this->node->getAttribute('value'); | 44 $this->value = $this->node->getAttribute('value'); |
44 } | 45 } |