diff --git a/ncp-web/backups.php b/ncp-web/backups.php index 28f0c2f2b..b045e4543 100644 --- a/ncp-web/backups.php +++ b/ncp-web/backups.php @@ -55,7 +55,10 @@ function filesize_compat($file) $cache_str = file_get_contents($cache_file) or exit("error opening ${cache_file}"); - $cache = json_decode($cache_str, true) or []; + $cache = json_decode($cache_str, true); + if (!is_array($cache)) { + $cache = []; + } } else { $cache = []; }