mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 06:58:49 +02:00
⬆️ N°4770 Update to latest Symfony 3.4
This commit is contained in:
12
lib/symfony/cache/Traits/PhpFilesTrait.php
vendored
12
lib/symfony/cache/Traits/PhpFilesTrait.php
vendored
@@ -30,7 +30,7 @@ trait PhpFilesTrait
|
||||
|
||||
public static function isSupported()
|
||||
{
|
||||
return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN);
|
||||
return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ trait PhpFilesTrait
|
||||
{
|
||||
$time = time();
|
||||
$pruned = true;
|
||||
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN);
|
||||
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
set_error_handler($this->includeHandler);
|
||||
try {
|
||||
@@ -118,8 +118,8 @@ trait PhpFilesTrait
|
||||
protected function doSave(array $values, $lifetime)
|
||||
{
|
||||
$ok = true;
|
||||
$data = [$lifetime ? time() + $lifetime : PHP_INT_MAX, ''];
|
||||
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN);
|
||||
$data = [$lifetime ? time() + $lifetime : \PHP_INT_MAX, ''];
|
||||
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
if (null === $value || \is_object($value)) {
|
||||
@@ -137,7 +137,7 @@ trait PhpFilesTrait
|
||||
$value = serialize($value);
|
||||
}
|
||||
} elseif (!is_scalar($value)) {
|
||||
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
|
||||
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, \gettype($value)));
|
||||
}
|
||||
|
||||
$data[1] = $value;
|
||||
@@ -150,7 +150,7 @@ trait PhpFilesTrait
|
||||
}
|
||||
|
||||
if (!$ok && !is_writable($this->directory)) {
|
||||
throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
|
||||
throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory));
|
||||
}
|
||||
|
||||
return $ok;
|
||||
|
||||
Reference in New Issue
Block a user