Skip to content

Commit

Permalink
fix: 修改fpm模式下偶尔出现clear log文件不存在问题
Browse files Browse the repository at this point in the history
  • Loading branch information
titrxw committed Jul 7, 2021
1 parent 18976d1 commit 1e128b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class App {
const NAME = 'w7-rangine';
const VERSION = '2.4.20';
const VERSION = '2.4.21';

public static $self;
/**
Expand Down
6 changes: 5 additions & 1 deletion Src/Core/Log/Provider/LogProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ private function clearLog() {
if (!empty($tree)) {
foreach ($tree as $file) {
if (strstr($file, '.log') !== false) {
unlink($file);
try {
unlink($file);
} catch (ErrorException $e) {
//Ignore the exception
}
}
}
}
Expand Down

0 comments on commit 1e128b3

Please sign in to comment.