Skip to content

Commit 834a8ff

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: fix merge drop logger mock in favor of using the BufferingLogger catch ValueError thrown on PHP 8 [Yaml Parser] Fix edge cases when parsing multiple documents fix parsing comments not prefixed by a space [Translator] Make sure a null locale is handled properly deal with errors being thrown on PHP 8 [Cache] Allow cache tags to be objects implementing __toString() [HttpKernel] Do not override max_redirects option in HttpClientKernel remove superfluous cast [HttpClient] Support for CURLOPT_LOCALPORT. Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3). Fixed exception message formatting [FrameworkBundle] Fix error in xsd which prevent to register more than one metadata [Console] work around disabled putenv() [PhpUnitBridge] Fix error with ReflectionClass [HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
2 parents 847297e + 3a7c64f commit 834a8ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Constraints/TimezoneValidator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ public function validate($value, Constraint $constraint)
7878
private static function getPhpTimezones(int $zone, string $countryCode = null): array
7979
{
8080
if (null !== $countryCode) {
81-
return @\DateTimeZone::listIdentifiers($zone, $countryCode) ?: [];
81+
try {
82+
return @\DateTimeZone::listIdentifiers($zone, $countryCode) ?: [];
83+
} catch (\ValueError $e) {
84+
return [];
85+
}
8286
}
8387

8488
return \DateTimeZone::listIdentifiers($zone);

0 commit comments

Comments
 (0)