1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Fix warning: check for RASPI_CACHE_PATH

This commit is contained in:
billz 2021-02-02 11:15:08 +00:00
parent bdafa8dfbd
commit 3d2d608477

View File

@ -492,9 +492,11 @@ function readCache($key)
function writeCache($key, $data)
{
mkdir(RASPI_CACHE_PATH, 0777, true);
$cacheKey = expandCacheKey($key);
file_put_contents($cacheKey, $data);
if (!file_exists(RASPI_CACHE_PATH)) {
mkdir(RASPI_CACHE_PATH, 0777, true);
$cacheKey = expandCacheKey($key);
file_put_contents($cacheKey, $data);
}
}
function deleteCache($key)