Skip to content

Commit 764926a

Browse files
committed
Do not duplicate log messages in memory
1 parent 98c4bb8 commit 764926a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Yii Framework 2 Change Log
44
2.0.50 under development
55
------------------------
66

7+
- Bug #19984: Do not duplicate log messages in memory (lubosdz)
78
- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)
89
- Bug #19940: File Log writer without newline (terabytesoftw)
910
- Bug #19951: Removed unneeded MIME file tests (schmunk42)

framework/log/FileTarget.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ public function init()
107107
public function export()
108108
{
109109
$text = implode("\n", array_map([$this, 'formatMessage'], $this->messages)) . "\n";
110-
$trimmedText = trim($text);
111110

112-
if (empty($trimmedText)) {
111+
if (!trim($text)) {
113112
return; // No messages to export, so we exit the function early
114113
}
115114

0 commit comments

Comments
 (0)