Skip to content

Commit

Permalink
Dont set the locale implicitly, just use the value provided by \Local…
Browse files Browse the repository at this point in the history
…e::getDefault() if none is set
  • Loading branch information
MatthiasKuehneEllerhold committed Dec 6, 2023
1 parent cff848b commit a101ce1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/CurrencyFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function setLocale($locale)
public function getLocale()
{
if ($this->locale === null) {
$this->locale = Locale::getDefault();
return Locale::getDefault();
}

return $this->locale;
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/DateFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function setLocale($locale)
public function getLocale()
{
if ($this->locale === null) {
$this->locale = Locale::getDefault();
return Locale::getDefault();
}

return $this->locale;
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/NumberFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function setLocale($locale)
public function getLocale()
{
if ($this->locale === null) {
$this->locale = Locale::getDefault();
return Locale::getDefault();
}

return $this->locale;
Expand Down

0 comments on commit a101ce1

Please sign in to comment.