From b48280f97489c751a547414dfd1120a3e82d79c1 Mon Sep 17 00:00:00 2001 From: patel-vansh Date: Thu, 19 Nov 2026 16:12:05 +0530 Subject: [PATCH 1/3] fix: handle missing debugbar history files --- system/Debug/Toolbar/Collectors/History.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/Debug/Toolbar/Collectors/History.php b/system/Debug/Toolbar/Collectors/History.php index d306810f202c..8b3b7c45e38a 100644 --- a/system/Debug/Toolbar/Collectors/History.php +++ b/system/Debug/Toolbar/Collectors/History.php @@ -86,7 +86,10 @@ public function setFiles(string $current, int $limit = 20) // Oldest files will be deleted if ($limit >= 0 && $counter > $limit) { - unlink($filename); + if (is_file($filename)) { + // No error or warning if file is already deleted + @unlink($filename); + } continue; } From db0b5e514f5414573f8c37b9dbcf8e6152df730e Mon Sep 17 00:00:00 2001 From: patel-vansh Date: Thu, 19 Nov 2026 16:16:42 +0530 Subject: [PATCH 2/3] add changelog --- docs/changelogs/v4.7.7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelogs/v4.7.7.md b/docs/changelogs/v4.7.7.md index 40692b65213d..c9fed3f1b02a 100644 --- a/docs/changelogs/v4.7.7.md +++ b/docs/changelogs/v4.7.7.md @@ -30,6 +30,7 @@ Release Date: Unreleased - **Database:** Fixed a bug where `SQLSRV\Forge::_alterTable()` interpolated table and column names without escaping in default constraint lookups. - **Database:** Fixed a bug where `SQLite3\Connection::_foreignKeyData()` did not escape table identifiers in `PRAGMA foreign_key_list`, causing syntax errors on table names containing hyphens or schemas. - **Database:** Fixed a bug where `SQLite3\Table::dropIndexes()` used single-quoted string literals instead of escaped identifiers in `DROP INDEX IF EXISTS`, causing syntax errors on index names containing quotes or special characters. +- **Debug Toolbar:** Fixed a bug where `History::setFiles()` emitted a PHP warning when attempting to delete a debugbar history file that had already been removed. - **Helpers:** Fixed a bug where `excerpt()` threw a `TypeError` when `$phrase` was not found in `$text` or when `$phrase` was `null` and `$radius` was an odd integer. When `$phrase` is not found, `excerpt()` now falls back to extracting an excerpt from the beginning of `$text`. - **Helpers:** Fixed bugs in `ArrayHelper::dotKeyExists()` where `'0'` path segments caused early loop termination, non-array intermediate values threw a `TypeError`, and paths with segments after a wildcard failed when the wildcard matched multiple elements. - **Helpers:** Fixed escaping of attribute values in HTML media helpers to prevent malformed HTML and attribute injection. From 896ea5bbfd6f7efec543c672b2fb2e5ee6b96bd7 Mon Sep 17 00:00:00 2001 From: patel-vansh Date: Thu, 19 Nov 2026 19:59:41 +0530 Subject: [PATCH 3/3] remove redundant comment --- system/Debug/Toolbar/Collectors/History.php | 1 - 1 file changed, 1 deletion(-) diff --git a/system/Debug/Toolbar/Collectors/History.php b/system/Debug/Toolbar/Collectors/History.php index 8b3b7c45e38a..0f6d52a78118 100644 --- a/system/Debug/Toolbar/Collectors/History.php +++ b/system/Debug/Toolbar/Collectors/History.php @@ -87,7 +87,6 @@ public function setFiles(string $current, int $limit = 20) // Oldest files will be deleted if ($limit >= 0 && $counter > $limit) { if (is_file($filename)) { - // No error or warning if file is already deleted @unlink($filename); }