Skip to content

Commit

Permalink
Explicitly cast SplFileInfo to a string
Browse files Browse the repository at this point in the history
In strict mode, SplFileInfo does not implicitly get cast to a string
  • Loading branch information
RVxLab committed Dec 23, 2023
1 parent c4f296f commit 1e48698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TemporaryDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected function deleteDirectory(string $path): bool
}

foreach (new FilesystemIterator($path) as $item) {
if (! $this->deleteDirectory($item)) {
if (! $this->deleteDirectory((string) $item)) {
return false;
}
}
Expand Down

0 comments on commit 1e48698

Please sign in to comment.