mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
fix Setting::get()
This commit is contained in:
@@ -15,9 +15,11 @@ class Setting extends NexusModel
|
||||
$rows = self::query()->get(['name', 'value']);
|
||||
foreach ($rows as $row) {
|
||||
$value = $row->value;
|
||||
$arr = json_decode($value, true);
|
||||
if (is_array($arr)) {
|
||||
$value = $arr;
|
||||
if (!is_null($value)) {
|
||||
$arr = json_decode($value, true);
|
||||
if (is_array($arr)) {
|
||||
$value = $arr;
|
||||
}
|
||||
}
|
||||
Arr::set($settings, $row->name, $value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user