Skip to content

Commit 8a43c32

Browse files
committed
Performance patch.
Changelog excerpt: - Eliminated a low-risk potential performance bottleneck at the loadL10N method.
1 parent 9fac2da commit 8a43c32

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
113113
[2023.03.24; Bug-fix; Maikuolan]: Typo in the readFileContent call for the channels data; Fixed.
114114

115115
[2023.03.24; New Feature; Maikuolan]: Added the ability to log outbound requests.
116+
117+
[2023.03.31; Maikuolan]: Eliminated a low-risk potential performance bottleneck at the loadL10N method.

src/Loader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: The loader (last modified: 2023.03.24).
11+
* This file: The loader (last modified: 2023.03.31).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -641,7 +641,7 @@ public function loadL10N(string $Path = ''): void
641641
$this->ClientL10N = &$this->L10N;
642642
}
643643
} else {
644-
$Try = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
644+
$Try = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE'], 20);
645645
foreach ($Try as $Accepted) {
646646
$Accepted = preg_replace(['~;.*$~', '~[^-A-Za-z]~'], '', $Accepted);
647647
$ForAutoAssign = $Accepted;

0 commit comments

Comments
 (0)