From efda3764ba6772417bc82c3be6acf513cfbd8950 Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 5 Jun 2024 23:46:49 +0800 Subject: [PATCH] code improve for json file read to array --- plugins/Common.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/Common.php b/plugins/Common.php index 8a29699..1314e92 100644 --- a/plugins/Common.php +++ b/plugins/Common.php @@ -361,10 +361,7 @@ Class Common { $cache_filename = "{$rootDir}/custom_config_usermap.json"; if (file_exists($cache_filename)) { $mapContent = file_get_contents($cache_filename); - $map = json_decode($mapContent); - if (is_object($map)) { - $map = self::dictToArray($map); - } + $map = json_decode($mapContent, true); } }