mirror of
https://github.com/slawkens/myaac.git
synced 2026-02-03 03:46:22 +01:00
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:
@@ -122,6 +122,8 @@ class Settings implements \ArrayAccess
|
||||
public static function display($plugin, $settings): array
|
||||
{
|
||||
$settingsDb = ModelsSettings::where('name', $plugin)->pluck('value', 'key')->toArray();
|
||||
|
||||
if ($plugin === 'core') {
|
||||
$config = [];
|
||||
require BASE . 'config.local.php';
|
||||
|
||||
@@ -136,6 +138,7 @@ class Settings implements \ArrayAccess
|
||||
$settingsDb[$key] = (string)$value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$javascript = '';
|
||||
ob_start();
|
||||
|
||||
Reference in New Issue
Block a user