Browse Source

code improve for json file read to array

master
filesite 6 months ago
parent
commit
efda3764ba
  1. 5
      plugins/Common.php

5
plugins/Common.php

@ -361,10 +361,7 @@ Class Common {
$cache_filename = "{$rootDir}/custom_config_usermap.json"; $cache_filename = "{$rootDir}/custom_config_usermap.json";
if (file_exists($cache_filename)) { if (file_exists($cache_filename)) {
$mapContent = file_get_contents($cache_filename); $mapContent = file_get_contents($cache_filename);
$map = json_decode($mapContent); $map = json_decode($mapContent, true);
if (is_object($map)) {
$map = self::dictToArray($map);
}
} }
} }

Loading…
Cancel
Save