Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/validator/Constraints/CurrencyValidator.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 |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
35 | 35 |
36 if (null === $value || '' === $value) { | 36 if (null === $value || '' === $value) { |
37 return; | 37 return; |
38 } | 38 } |
39 | 39 |
40 if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { | 40 if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { |
41 throw new UnexpectedTypeException($value, 'string'); | 41 throw new UnexpectedTypeException($value, 'string'); |
42 } | 42 } |
43 | 43 |
44 $value = (string) $value; | 44 $value = (string) $value; |
45 $currencies = Intl::getCurrencyBundle()->getCurrencyNames(); | 45 $currencies = Intl::getCurrencyBundle()->getCurrencyNames(); |