Skip to content

Commit b48280f

Browse files
committed
fix: handle missing debugbar history files
1 parent 28da6fe commit b48280f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎system/Debug/Toolbar/Collectors/History.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ public function setFiles(string $current, int $limit = 20)
8686

8787
// Oldest files will be deleted
8888
if ($limit >= 0 && $counter > $limit) {
89-
unlink($filename);
89+
if (is_file($filename)) {
90+
// No error or warning if file is already deleted
91+
@unlink($filename);
92+
}
9093

9194
continue;
9295
}

0 commit comments

Comments
 (0)