Fix "Implement a class for automatic temporary file handling"

TemporaryFile::commit throws instead of returning a bool.
This commit is contained in:
Alexei Sorokin
2020-09-14 20:37:48 +03:00
committed by Diogo Peralta Cordeiro
parent d7e7396d17
commit 160b6ccd94
2 changed files with 12 additions and 2 deletions

View File

@@ -115,7 +115,12 @@ class FFmpegPlugin extends Plugin
}
if ($success) {
$success = $tempfile->commit($outpath);
try {
$tempfile->commit($outpath);
} catch (TemporaryFileException $e) {
$this->log(LOG_ERR, 'Unable to save the GIF image');
$success = false;
}
}
@unlink($palette);