summaryrefslogtreecommitdiffstats
path: root/library/Director/StartupLogRenderer.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/StartupLogRenderer.php')
-rw-r--r--library/Director/StartupLogRenderer.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/Director/StartupLogRenderer.php b/library/Director/StartupLogRenderer.php
index bc7b3ea..9d5810f 100644
--- a/library/Director/StartupLogRenderer.php
+++ b/library/Director/StartupLogRenderer.php
@@ -33,7 +33,9 @@ class StartupLogRenderer implements ValidHtml
// len [stage] + 1
$markReplace = ' ^';
- foreach (preg_split('/\n/', $log) as $line) {
+ /** @var string[] $logLines */
+ $logLines = preg_split('/\n/', $log);
+ foreach ($logLines as $line) {
if (preg_match('/^\[([\d\s\:\+\-]+)\]\s/', $line, $m)) {
$time = $m[1];
// TODO: we might use new DateTime($time) and show a special "timeAgo"
@@ -83,9 +85,9 @@ class StartupLogRenderer implements ValidHtml
}
if ($time === null) {
- $lines[] .= $line;
+ $lines[] = $line;
} else {
- $lines[] .= "[$time] $line";
+ $lines[] = "[$time] $line";
}
}
return implode("\n", $lines);