diff --git a/src/Sitemap/DumpingUrlset.php b/src/Sitemap/DumpingUrlset.php index 6efc3f5..bbd1e4e 100644 --- a/src/Sitemap/DumpingUrlset.php +++ b/src/Sitemap/DumpingUrlset.php @@ -58,8 +58,10 @@ public function save(string $targetDir, bool $gzip = false): void $streamInfo = stream_get_meta_data($this->bodyFile); fclose($this->bodyFile); - // removing temporary file - unlink($streamInfo['uri']); + if (isset($streamInfo['uri'])) { + // removing temporary file + unlink($streamInfo['uri']); + } if ($gzip) { $this->loc .= '.gz';