From 0f0a1e65800149d00618bc4a00c77f5e9b8145a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Thu, 14 Jan 2021 18:43:23 +0100 Subject: [PATCH] Use strict temp removing. --- src/PackageRegistrator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PackageRegistrator.php b/src/PackageRegistrator.php index 498038a..e47862d 100644 --- a/src/PackageRegistrator.php +++ b/src/PackageRegistrator.php @@ -140,7 +140,7 @@ public static function composerPostAutoloadDump(): void FileSystem::delete(dirname(__DIR__, 4) . '/app/config/package.neon'); if (\is_dir($tempDir = dirname(__DIR__, 4) . '/temp')) { foreach (new \FilesystemIterator($tempDir) as $item) { - FileSystem::delete((string) $item->getPathname()); + FileSystem::delete(\is_string($item) ? $item : (string) $item->getPathname()); } } } catch (\Throwable $e) {