Mercurial > hg > cmmr2012-drupal-site
diff vendor/symfony/validator/Constraints/CollectionValidator.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/vendor/symfony/validator/Constraints/CollectionValidator.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/symfony/validator/Constraints/CollectionValidator.php Thu Feb 28 13:11:55 2019 +0000 @@ -33,7 +33,7 @@ return; } - if (!is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) { + if (!\is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) { throw new UnexpectedTypeException($value, 'array or Traversable and ArrayAccess'); } @@ -50,11 +50,11 @@ foreach ($constraint->fields as $field => $fieldConstraint) { // bug fix issue #2779 - $existsInArray = is_array($value) && array_key_exists($field, $value); + $existsInArray = \is_array($value) && array_key_exists($field, $value); $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field); if ($existsInArray || $existsInArrayAccess) { - if (count($fieldConstraint->constraints) > 0) { + if (\count($fieldConstraint->constraints) > 0) { $context->getValidator() ->inContext($context) ->atPath('['.$field.']')