Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/Constraints/DateTimeValidator.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
36 | 36 |
37 if (null === $value || '' === $value || $value instanceof \DateTimeInterface) { | 37 if (null === $value || '' === $value || $value instanceof \DateTimeInterface) { |
38 return; | 38 return; |
39 } | 39 } |
40 | 40 |
41 if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { | 41 if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { |
42 throw new UnexpectedTypeException($value, 'string'); | 42 throw new UnexpectedTypeException($value, 'string'); |
43 } | 43 } |
44 | 44 |
45 $value = (string) $value; | 45 $value = (string) $value; |
46 | 46 |