comparison vendor/symfony/validator/Constraints/LanguageValidator.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
34 34
35 if (null === $value || '' === $value) { 35 if (null === $value || '' === $value) {
36 return; 36 return;
37 } 37 }
38 38
39 if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { 39 if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
40 throw new UnexpectedTypeException($value, 'string'); 40 throw new UnexpectedTypeException($value, 'string');
41 } 41 }
42 42
43 $value = (string) $value; 43 $value = (string) $value;
44 $languages = Intl::getLanguageBundle()->getLanguageNames(); 44 $languages = Intl::getLanguageBundle()->getLanguageNames();