mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
TemporaryLocalFileStorage: Fix unexpected crash in destructor
(cherry picked from commit 6d2a585de92c4cfa053df0d3b600448eef5423c2)
This commit is contained in:
parent
9a4a11861a
commit
1bcf2627a8
@ -28,6 +28,12 @@ class TemporaryLocalFileStorage extends LocalFileStorage
|
|||||||
*/
|
*/
|
||||||
public function __destruct()
|
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(
|
$directoryIterator = new RecursiveIteratorIterator(
|
||||||
new RecursiveDirectoryIterator(
|
new RecursiveDirectoryIterator(
|
||||||
$this->baseDir,
|
$this->baseDir,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user