mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-06-09 08:34:04 -04:00
TemporaryLocalFileStorage: Fix unexpected crash in destructor
This commit is contained in:
parent
e542982de0
commit
6d2a585de9
1 changed files with 6 additions and 0 deletions
|
|
@ -28,6 +28,12 @@ class TemporaryLocalFileStorage extends LocalFileStorage
|
|||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
// Some classes may have cleaned up the tmp file, so we need to check this
|
||||
// beforehand to prevent an unexpected crash.
|
||||
if (! @realpath($this->baseDir)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$directoryIterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator(
|
||||
$this->baseDir,
|
||||
|
|
|
|||
Loading…
Reference in a new issue