Settings: Fix variable overlapping if same var name as in core

Example: Plugin has setting key named "env". The same key exist in core. It would falsely get value from core, instead of the plugin
This commit is contained in:
slawkens
2026-01-30 16:41:31 +01:00
parent 5e4806f891
commit c2415e9df3

View File

@@ -122,6 +122,8 @@ class Settings implements \ArrayAccess
public static function display($plugin, $settings): array public static function display($plugin, $settings): array
{ {
$settingsDb = ModelsSettings::where('name', $plugin)->pluck('value', 'key')->toArray(); $settingsDb = ModelsSettings::where('name', $plugin)->pluck('value', 'key')->toArray();
if ($plugin === 'core') {
$config = []; $config = [];
require BASE . 'config.local.php'; require BASE . 'config.local.php';
@@ -136,6 +138,7 @@ class Settings implements \ArrayAccess
$settingsDb[$key] = (string)$value; $settingsDb[$key] = (string)$value;
} }
} }
}
$javascript = ''; $javascript = '';
ob_start(); ob_start();