[UTIL][TemporaryFile] Silence warnings in critical section inside TemporaryFile

This commit is contained in:
Hugo Sales 2022-10-21 11:28:56 +01:00
parent c4d6df4637
commit 46ff8aacd2
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -216,8 +216,8 @@ class TemporaryFile extends SplFileInfo
},
);
$renamed = rename($this->getPathname(), $destpath);
$chmoded = chmod($destpath, $filemode);
$renamed = @rename($this->getPathname(), $destpath);
$chmoded = @chmod($destpath, $filemode);
restore_error_handler();
if (!$renamed || !$chmoded) {
if (!$existed && file_exists($destpath)) {