N°7405 - Fix unit tests

This commit is contained in:
Eric Espie
2024-04-05 11:29:41 +02:00
parent 1be67f349f
commit 9dc7b6dc0c

View File

@@ -60,14 +60,15 @@ function apc_store($key, $var = NULL, $ttl = 0)
*/
function apc_fetch($key)
{
if (is_array($key))
{
$aResult = array();
foreach($key as $sKey)
{
if (is_array($key)) {
$aResult = [];
foreach ($key as $sKey) {
$aResult[$sKey] = apcFile::FetchOneFile($sKey);
}
return $aResult;
} elseif (is_null($key)) {
return false;
}
return apcFile::FetchOneFile($key);
}
@@ -214,7 +215,12 @@ class apcFile
if (empty($sKey)) {
return false;
}
if (is_file(self::GetCacheFileName($sKey))) {
@unlink(self::GetCacheFileName($sKey));
}
if (is_file(self::GetCacheFileName('-'.$sKey))) {
@unlink(self::GetCacheFileName('-'.$sKey));
}
if ($iTTL > 0) {
// hint for ttl management
$sKey = '-'.$sKey;