using Http::getData instead file_get_contents

This commit is contained in:
Ibnu Maksum
2023-09-11 14:26:58 +07:00
parent c57bbeace3
commit b5ddf37649
3 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ $cache = File::pathFixer('system/cache/plugin_repository.json');
if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) {
$json = json_decode(file_get_contents($cache), true);
} else {
$data = file_get_contents($plugin_repository);
$data = Http::getData($plugin_repository);
file_put_contents($cache, $data);
$json = json_decode($data, true);
}