From 48344045752ab093cbe77f70d18a4ced72e012e7 Mon Sep 17 00:00:00 2001 From: Dave M Date: Tue, 7 Jul 2026 12:24:57 +0000 Subject: [PATCH] - Fixed errorLogPath default value if none is provided --- skeleton/public/index.php | 6 +++++- src/Kernel.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/skeleton/public/index.php b/skeleton/public/index.php index 2741b00..f4f039a 100644 --- a/skeleton/public/index.php +++ b/skeleton/public/index.php @@ -1,7 +1,11 @@ %s
%s
", $t->getMessage(), $t->getFile() . ":" . $t->getLine(), $t->getTraceAsString()); diff --git a/src/Kernel.php b/src/Kernel.php index 68ec786..28c0ef6 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -30,7 +30,6 @@ class Kernel public string $errorLogPath; - public function __construct( public string $projectPath ) @@ -99,11 +98,12 @@ class Kernel } ini_set("log_errors", "1"); - ini_set("error_log", $this->errorLogPath); + ini_set("error_log", $this->errorLogPath ?? getenv("LOGS_PATH") . DIRECTORY_SEPARATOR. date("Y-m").".log"); ini_set('display_errors', getenv("DEBUG") ? 'on' : 'on'); error_reporting($this->errorReporting); + return $this; }