Skip to content

Commit

Permalink
Do not duplicate log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lubosdz committed Sep 28, 2023
1 parent 98c4bb8 commit 03ac4e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions framework/log/FileTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ public function init()
public function export()
{
$text = implode("\n", array_map([$this, 'formatMessage'], $this->messages)) . "\n";
$trimmedText = trim($text);

if (empty($trimmedText)) {
if (!trim($text)) {
return; // No messages to export, so we exit the function early
}

Expand Down

0 comments on commit 03ac4e4

Please sign in to comment.