From 95273631b52c2908ee723383436a8eb9fac0ff38 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 24 Jun 2024 12:18:19 +0200 Subject: [PATCH] Fix the search of errors by exception id The non-recursive variant of the `DirectoryUtil` returns a plain list of filenames rather than the pathname. See #5932 --- .../files/lib/acp/page/ExceptionLogViewPage.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index b68da36656..5495a24425 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -102,7 +102,11 @@ class ExceptionLogViewPage extends MultipleLinkPage RegistryHandler::getInstance()->set('com.woltlab.wcf', 'exceptionMailerTimestamp', TIME_NOW); $fileNameRegex = new Regex('(?:^|/)\d{4}-\d{2}-\d{2}\.txt$'); - $this->logFiles = DirectoryUtil::getInstance(WCF_DIR . 'log/', false)->getFiles(\SORT_DESC, $fileNameRegex); + $logFiles = DirectoryUtil::getInstance(WCF_DIR . 'log/', false)->getFiles(\SORT_DESC, $fileNameRegex); + foreach ($logFiles as $logFile) { + $pathname = WCF_DIR . 'log/' . $logFile; + $this->logFiles[$pathname] = $pathname; + } if ($this->exceptionID) { // search the appropriate file -- 2.20.1