comparison vendor/symfony/validator/Constraints/Length.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
45 if (null !== $options && !\is_array($options)) { 45 if (null !== $options && !\is_array($options)) {
46 $options = [ 46 $options = [
47 'min' => $options, 47 'min' => $options,
48 'max' => $options, 48 'max' => $options,
49 ]; 49 ];
50 } elseif (\is_array($options) && isset($options['value']) && !isset($options['min']) && !isset($options['max'])) {
51 $options['min'] = $options['max'] = $options['value'];
52 unset($options['value']);
50 } 53 }
51 54
52 parent::__construct($options); 55 parent::__construct($options);
53 56
54 if (null === $this->min && null === $this->max) { 57 if (null === $this->min && null === $this->max) {