mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-24 04:50:31 +08:00
Fixes #5997: The same message may be exported twice to log targets
This commit is contained in:
@ -23,6 +23,7 @@ Yii Framework 2 Change Log
|
|||||||
- Bug #5863: Selecting all individual `yii\grid\CheckboxColumn` checkboxes in grid view wasn't resulting in "all" checkbox selected (samdark)
|
- Bug #5863: Selecting all individual `yii\grid\CheckboxColumn` checkboxes in grid view wasn't resulting in "all" checkbox selected (samdark)
|
||||||
- Bug #5893: `yii\helpers\ArrayHelper::toArray()` now applies `$properties` parameter for converting descending objects in recursive calls (otsec)
|
- Bug #5893: `yii\helpers\ArrayHelper::toArray()` now applies `$properties` parameter for converting descending objects in recursive calls (otsec)
|
||||||
- Bug #5925: `ArrayHelper::htmlEncode()` does not work properly when the value being encoded is a nested array (tebazil)
|
- Bug #5925: `ArrayHelper::htmlEncode()` does not work properly when the value being encoded is a nested array (tebazil)
|
||||||
|
- Bug #5997: The same message may be exported twice to log targets (klimov-paul)
|
||||||
- Bug: Gii console command help information does not contain global options (qiangxue)
|
- Bug: Gii console command help information does not contain global options (qiangxue)
|
||||||
- Bug: `yii\web\UrlRule` was unable to create URLs for rules containing unicode characters (samdark)
|
- Bug: `yii\web\UrlRule` was unable to create URLs for rules containing unicode characters (samdark)
|
||||||
- Enh #4181: Added `yii\bootstrap\Modal::$headerOptions` and `yii\bootstrap\Modal::$footerOptions` (tuxoff, samdark)
|
- Enh #4181: Added `yii\bootstrap\Modal::$headerOptions` and `yii\bootstrap\Modal::$footerOptions` (tuxoff, samdark)
|
||||||
|
@ -163,7 +163,9 @@ class Logger extends Component
|
|||||||
public function flush($final = false)
|
public function flush($final = false)
|
||||||
{
|
{
|
||||||
$messages = $this->messages;
|
$messages = $this->messages;
|
||||||
$this->messages = []; // prevent processing same message twice in case flush is invoked during dispatching
|
// https://github.com/yiisoft/yii2/issues/5619
|
||||||
|
// new messages could be logged while the existing ones are being handled by targets
|
||||||
|
$this->messages = [];
|
||||||
if ($this->dispatcher instanceof Dispatcher) {
|
if ($this->dispatcher instanceof Dispatcher) {
|
||||||
$this->dispatcher->dispatch($messages, $final);
|
$this->dispatcher->dispatch($messages, $final);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user