Skip to content

Commit 64eb4e3

Browse files
committed
L10N patch.
1 parent 5bf18fa commit 64eb4e3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"require": {
1515
"php": ">=7.2.0",
16-
"maikuolan/common": "^2.5",
16+
"maikuolan/common": "^2.7",
1717
"ext-pcre": "*"
1818
},
1919
"suggest": {

src/Loader.php

Lines changed: 6 additions & 5 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: 2021.07.10).
11+
* This file: The loader (last modified: 2021.08.25).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -285,7 +285,7 @@ public function __construct(
285285
$Configuration = $this->readFile($this->AssetsPath . 'config.yml')
286286
) {
287287
$Defaults = [];
288-
$this->YAML->process($Configuration, $Defaults);
288+
$this->YAML->process($Configuration, $Defaults, 0, true);
289289
if (isset($Defaults)) {
290290
$this->fallback($Defaults);
291291
$this->ConfigurationDefaults = array_merge_recursive($this->ConfigurationDefaults, $Defaults);
@@ -335,9 +335,10 @@ public function __construct(
335335
/** Instantiate the request class. */
336336
$this->Request = new \Maikuolan\Common\Request();
337337
$this->Request->DefaultTimeout = $this->Configuration['core']['default_timeout'];
338-
$this->Request->Channels = (
339-
$Channels = $this->readFileBlocks($this->AssetsPath . 'channels.yaml')
340-
) ? (new \Maikuolan\Common\YAML($Channels))->Data : [];
338+
$ChannelsDataArray = [];
339+
$this->YAML->process($this->readFileBlocks($this->AssetsPath . 'channels.yaml'), $ChannelsDataArray);
340+
$this->Request->Channels = $ChannelsDataArray ?: [];
341+
unset($ChannelsDataArray);
341342
if (!isset($this->Request->Channels['Triggers'])) {
342343
$this->Request->Channels['Triggers'] = [];
343344
}

0 commit comments

Comments
 (0)