projects
/
friendica.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a2f4dc
)
Check for same language
author
nupplaPhil
<admin@philipp.info>
Sun, 29 Dec 2019 15:39:25 +0000
(16:39 +0100)
committer
nupplaPhil
<admin@philipp.info>
Sun, 29 Dec 2019 15:39:25 +0000
(16:39 +0100)
src/Core/L10n/L10n.php
patch
|
blob
|
history
diff --git
a/src/Core/L10n/L10n.php
b/src/Core/L10n/L10n.php
index be9e1419f39ab60cf2dbac73a41ef186ab2926f9..ad4f6537160464bf0b5a94ef92478e48fac5c0f8 100644
(file)
--- a/
src/Core/L10n/L10n.php
+++ b/
src/Core/L10n/L10n.php
@@
-413,6
+413,11
@@
class L10n
*/
public function withLang(string $lang)
{
+ // Don't create a new instance for same language
+ if ($lang === $this->lang) {
+ return $this;
+ }
+
$newL10n = clone $this;
$newL10n->loadTranslationTable($lang);
return $newL10n;