mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-17 12:28:41 +00:00
Fix locking
This commit is contained in:
parent
7b36dafa57
commit
7bd0bc7067
|
|
@ -311,8 +311,10 @@ class FileLogger implements LoggerInterface
|
|||
$this->createFile();
|
||||
$this->fp = fopen($this->path, 'a');
|
||||
|
||||
if ($this->fp !== false) {
|
||||
if (flock($this->fp, LOCK_EX) && $this->fp !== false) {
|
||||
fwrite($this->fp, $message . "\n");
|
||||
fflush($this->fp);
|
||||
flock($this->fp, LOCK_UN);
|
||||
fclose($this->fp);
|
||||
$this->fp = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user