mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
N°8910 - Upgrade Symfony packages
This commit is contained in:
@@ -93,7 +93,7 @@ class File extends \SplFileInfo
|
||||
restore_error_handler();
|
||||
}
|
||||
if (!$renamed) {
|
||||
throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
|
||||
throw new FileException(\sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
|
||||
}
|
||||
|
||||
@chmod($target, 0666 & ~umask());
|
||||
@@ -106,7 +106,7 @@ class File extends \SplFileInfo
|
||||
$content = file_get_contents($this->getPathname());
|
||||
|
||||
if (false === $content) {
|
||||
throw new FileException(sprintf('Could not get the content of the file "%s".', $this->getPathname()));
|
||||
throw new FileException(\sprintf('Could not get the content of the file "%s".', $this->getPathname()));
|
||||
}
|
||||
|
||||
return $content;
|
||||
@@ -116,10 +116,10 @@ class File extends \SplFileInfo
|
||||
{
|
||||
if (!is_dir($directory)) {
|
||||
if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) {
|
||||
throw new FileException(sprintf('Unable to create the "%s" directory.', $directory));
|
||||
throw new FileException(\sprintf('Unable to create the "%s" directory.', $directory));
|
||||
}
|
||||
} elseif (!is_writable($directory)) {
|
||||
throw new FileException(sprintf('Unable to write in the "%s" directory.', $directory));
|
||||
throw new FileException(\sprintf('Unable to write in the "%s" directory.', $directory));
|
||||
}
|
||||
|
||||
$target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
|
||||
|
||||
Reference in New Issue
Block a user