From 16be65c454e068da02c21df8cc11eb60ea13bda0 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 24 Mar 2023 10:59:22 -0400 Subject: [PATCH] Correct issue with all logs returning same mtime and size in ProcessLogger --- wire/core/WireLog.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wire/core/WireLog.php b/wire/core/WireLog.php index ea2a38da..776187b6 100644 --- a/wire/core/WireLog.php +++ b/wire/core/WireLog.php @@ -238,6 +238,11 @@ class WireLog extends Wire { if($sortNewest) { krsort($logs); + $a = array(); + foreach($logs as $log) { + $a[$log['name']] = $log; + } + $logs = $a; } else { ksort($logs); } @@ -284,7 +289,7 @@ class WireLog extends Wire { if($file->getExtension() != $this->logExtension) continue; $name = $file->getBasename(".$this->logExtension"); if($name != $sanitizer->pageName($name)) continue; - $files[$name] = $file; + $files[$name] = clone $file; } return $files;