mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-27 16:38:41 +00:00
Test file before writing
This commit is contained in:
parent
cc0e737182
commit
746130671b
|
|
@ -309,6 +309,10 @@ class FileLogger implements LoggerInterface
|
|||
private function write(string $message) /* : void */
|
||||
{
|
||||
$this->createFile();
|
||||
if(!is_readable($this->path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fp = fopen($this->path, 'a');
|
||||
|
||||
if (flock($this->fp, LOCK_EX) && $this->fp !== false) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user