mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-15 14:50:56 +08:00
Fixes #16752: Fix rotating files under Windows
This commit is contained in:

committed by
GitHub

parent
6e02082303
commit
25e6cd45c5
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
|||||||
2.0.16 under development
|
2.0.16 under development
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
- Bug #16752: Fix rotating files under Windows (samdark, nadirvishun)
|
||||||
- Bug #16716: The ability to filter by pressing the Enter key when the option `$filterOnFocusOut` off (s1lver)
|
- Bug #16716: The ability to filter by pressing the Enter key when the option `$filterOnFocusOut` off (s1lver)
|
||||||
- Bug #15791: Added a warning when the form names conflict (s1lver, rustamwin)
|
- Bug #15791: Added a warning when the form names conflict (s1lver, rustamwin)
|
||||||
- Enh #16151: `ActiveQuery::getTableNameAndAlias()` is now protected (s1lver)
|
- Enh #16151: `ActiveQuery::getTableNameAndAlias()` is now protected (s1lver)
|
||||||
|
@ -115,9 +115,9 @@ class FileTarget extends Target
|
|||||||
clearstatcache();
|
clearstatcache();
|
||||||
}
|
}
|
||||||
if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) {
|
if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) {
|
||||||
$this->rotateFiles();
|
|
||||||
@flock($fp, LOCK_UN);
|
@flock($fp, LOCK_UN);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
|
$this->rotateFiles();
|
||||||
$writeResult = @file_put_contents($this->logFile, $text, FILE_APPEND | LOCK_EX);
|
$writeResult = @file_put_contents($this->logFile, $text, FILE_APPEND | LOCK_EX);
|
||||||
if ($writeResult === false) {
|
if ($writeResult === false) {
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
|
Reference in New Issue
Block a user