Skip to content

Commit

Permalink
Update src/Service/Checker/MonologChecker.php
Browse files Browse the repository at this point in the history
Co-authored-by: Mario Schäper <95750382+sitepark-schaeper@users.noreply.github.com>
  • Loading branch information
sitepark-veltrup and sitepark-schaeper authored Jun 26, 2024
1 parent a587e20 commit 99fd77f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Service/Checker/MonologChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ private function checkLogfile(?string $file): ?string
if ($file === null) {
return'logfile not set';
}
if (file_exists($file) && !is_writable($file)) {
return 'logfile not writable: ' . $file;
}

if (!file_exists($file)) {
$dir = dirname($file);
Expand All @@ -158,6 +155,10 @@ private function checkLogfile(?string $file): ?string
return 'logfile cannot be created: ' . $file;
}
}

if (!is_writable($file)) {
return 'logfile not writable: ' . $file;
}

return null;
}
Expand Down

0 comments on commit 99fd77f

Please sign in to comment.