Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9fa3895

Browse files
minor #23616 [VarDumper] Remove hhvm compat in time zone caster (maidmaid)
This PR was merged into the 4.0-dev branch. Discussion ---------- [VarDumper] Remove hhvm compat in time zone caster | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | / | License | MIT | Doc PR | / The 2nd arg of ``\Locale::getDisplayRegion()`` method is optional in PHP but required with HHVM. See https://3v4l.org/eAigW. Commits ------- 164015e Remove hhvm compat
2 parents c49895f + 164015e commit 9fa3895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/VarDumper/Caster/DateCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stu
6868
{
6969
$location = $timeZone->getLocation();
7070
$formatted = (new \Datetime('now', $timeZone))->format($location ? 'e (P)' : 'P');
71-
$title = $location && extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code'], \Locale::getDefault()) : '';
71+
$title = $location && extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : '';
7272

7373
$z = array(Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title));
7474

0 commit comments

Comments
 (0)