Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8611b0b

Browse filesBrowse files
committed
bug #38285 [Contracts][Translation] Optional Intl dependency (ro0NL)
This PR was merged into the 4.4 branch. Discussion ---------- [Contracts][Translation] Optional Intl dependency | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> same as #38283, and should help streamlining #38230 Commits ------- d65d39d [Contracts][Translation] Optional Intl dependency
2 parents d9bcb64 + d65d39d commit 8611b0b
Copy full SHA for 8611b0b

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Contracts/Translation/TranslatorTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Contracts/Translation/TranslatorTrait.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setLocale($locale)
3535
*/
3636
public function getLocale()
3737
{
38-
return $this->locale ?: \Locale::getDefault();
38+
return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
3939
}
4040

4141
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.