mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-16 04:59:42 +01:00
Fix cache.php for PHP 8
Automatic conversion of false to array is deprecated
This commit is contained in:
@@ -32,7 +32,7 @@ class cache
|
||||
{
|
||||
if (defined('DEV_STAGE'))
|
||||
{
|
||||
return false;
|
||||
return [];
|
||||
}
|
||||
|
||||
$name = preg_replace('![^a-z0-9_]!', '_', $name);
|
||||
@@ -40,11 +40,11 @@ class cache
|
||||
if (file_exists(PATH . 'cache/' . $name . '.php'))
|
||||
{
|
||||
include PATH . 'cache/' . $name . '.php';
|
||||
return empty($data) ? false : $data;
|
||||
return empty($data) ? [] : $data;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user