From 8cd369aee70e181287d3d567285a1b4f91144f4f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 18 Mar 2023 12:13:48 -0400 Subject: [PATCH] Fix Logger exception: gracefully handle permission issue (#1954) --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 6c3657cc..f4210aed 100644 --- a/index.php +++ b/index.php @@ -59,7 +59,7 @@ } $logger = new Logger( - dirname($conf->get('resource.log')), + is_writable($conf->get('resource.log')) ? dirname($conf->get('resource.log')) : 'php://temp', !$conf->get('dev.debug') ? LogLevel::INFO : LogLevel::DEBUG, ['filename' => basename($conf->get('resource.log'))] );