From c6fa494180bd8c440575a1a053bcb541c031d060 Mon Sep 17 00:00:00 2001 From: Louis Ouellet Date: Wed, 24 Sep 2025 14:56:54 -0400 Subject: [PATCH 1/2] General: Version bumped to v0.0.71 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2fcb726..6c2b1cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.0.70 +v0.0.71 From 912c76d5023f219ed17133301f1812c122f09cbe Mon Sep 17 00:00:00 2001 From: Louis Ouellet Date: Thu, 25 Sep 2025 10:46:12 -0400 Subject: [PATCH 2/2] BUGFIX: Hardened the init function and init command. --- Command/CoreCommand.php | 2 +- Helper/CoreHelper.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Command/CoreCommand.php b/Command/CoreCommand.php index 2bca74f..e4649af 100644 --- a/Command/CoreCommand.php +++ b/Command/CoreCommand.php @@ -165,7 +165,7 @@ private function matchCronField(string $expr, $value, int $min, int $max, ?array public function initAction() { // Initialize the framework - $this->Helper->Core->init(); + $this->Helper->Core->init(true); } /** diff --git a/Helper/CoreHelper.php b/Helper/CoreHelper.php index c8c9fa1..cb5f175 100644 --- a/Helper/CoreHelper.php +++ b/Helper/CoreHelper.php @@ -25,7 +25,7 @@ public function init(bool $force = false): bool // Path to file $htaccess = $CONFIG->root() . DIRECTORY_SEPARATOR . ".htaccess"; - // Check if the file exist + // Check if the file exist and we want to force the creation if($force && is_file($htaccess)) { // Delete file @@ -82,6 +82,13 @@ public function init(bool $force = false): bool // Path to file $webroot = $CONFIG->root() . DIRECTORY_SEPARATOR . "webroot"; + // Check if the directory exist and we want to force the creation + if($force && is_dir($webroot)) { + + // Delete file + $this->delete($webroot); + } + // Check if directory exists if(!is_dir($webroot) && !is_file($webroot) && !is_link($webroot)) {