Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+6 -10
View File
@@ -23,8 +23,6 @@ trait FilesystemTrait
{
use FilesystemCommonTrait;
private $marshaller;
/**
* @return bool
*/
@@ -70,7 +68,7 @@ trait FilesystemTrait
$value = stream_get_contents($h);
fclose($h);
if ($i === $id) {
$values[$id] = $this->marshaller->unmarshall($value);
$values[$id] = parent::unserialize($value);
}
}
}
@@ -93,19 +91,17 @@ trait FilesystemTrait
*/
protected function doSave(array $values, $lifetime)
{
$ok = true;
$expiresAt = $lifetime ? (time() + $lifetime) : 0;
$values = $this->marshaller->marshall($values, $failed);
foreach ($values as $id => $value) {
if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) {
$failed[] = $id;
}
$ok = $this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".serialize($value), $expiresAt) && $ok;
}
if ($failed && !is_writable($this->directory)) {
throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
if (!$ok && !is_writable($this->directory)) {
throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory));
}
return $failed;
return $ok;
}
}