Fix the search of errors by exception id
authorAlexander Ebert <ebert@woltlab.com>
Mon, 24 Jun 2024 10:18:19 +0000 (12:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 24 Jun 2024 10:18:19 +0000 (12:18 +0200)
The non-recursive variant of the `DirectoryUtil` returns a plain list of filenames rather than the pathname.

See #5932

wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php

index b68da366566946de63f0e1bf68b9a44a7d46f3b8..5495a24425c06f0156d47a8927adbc666ddb9f32 100644 (file)
@@ -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