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. diff --git a/system/Debug/Toolbar/Collectors/History.php b/system/Debug/Toolbar/Collectors/History.php index d306810f202c..0f6d52a78118 100644 --- a/system/Debug/Toolbar/Collectors/History.php +++ b/system/Debug/Toolbar/Collectors/History.php @@ -86,7 +86,9 @@ public function setFiles(string $current, int $limit = 20) // Oldest files will be deleted if ($limit >= 0 && $counter > $limit) { - unlink($filename); + if (is_file($filename)) { + @unlink($filename); + } continue; }