From: Alexander Ebert Date: Mon, 24 Jun 2024 10:18:19 +0000 (+0200) Subject: Fix the search of errors by exception id X-Git-Tag: 6.1.0_Alpha_1~4^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95273631b52c2908ee723383436a8eb9fac0ff38;p=GitHub%2FWoltLab%2FWCF.git 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 --- 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