From 0bb86588c1184c251bacd0486114adf45e77a320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Er=C5=91s=20=C3=81kos?= <85160502+erosakos@users.noreply.github.com> Date: Mon, 31 Oct 2022 14:32:38 +0100 Subject: [PATCH] fix: Fix FileStorage::find function (#510) * fix: Fix FileStorage::find function Fix FileStorage::find function usort callback function to return int instead of bool, because after PHP8 bool return value for the callback function is not supported. * fix: Fix FileStorage::find function Fix FileStorage::find function usort callback function to return int instead of bool, because after PHP8 bool return value for the callback function is not supported. --- src/DebugBar/Storage/FileStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DebugBar/Storage/FileStorage.php b/src/DebugBar/Storage/FileStorage.php index 98923e2..41c2be5 100644 --- a/src/DebugBar/Storage/FileStorage.php +++ b/src/DebugBar/Storage/FileStorage.php @@ -62,7 +62,7 @@ class FileStorage implements StorageInterface //Sort the files, newest first usort($files, function ($a, $b) { - return $a['time'] < $b['time']; + return $a['time'] <=> $b['time']; }); //Load the metadata and filter the results.