mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 15:38:40 +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 */
|
private function write(string $message) /* : void */
|
||||||
{
|
{
|
||||||
$this->createFile();
|
$this->createFile();
|
||||||
|
if(!is_readable($this->path)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->fp = fopen($this->path, 'a');
|
$this->fp = fopen($this->path, 'a');
|
||||||
|
|
||||||
if (flock($this->fp, LOCK_EX) && $this->fp !== false) {
|
if (flock($this->fp, LOCK_EX) && $this->fp !== false) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user