From 5dfdb0edd57a7352e0a47192af01b02f3a3cd4c2 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Mon, 6 Nov 2023 16:50:33 +0100 Subject: [PATCH] try to fix the install form see #355 --- app/class/Application.php | 1 + app/class/Config.php | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/class/Application.php b/app/class/Application.php index 8a182278..d50847eb 100644 --- a/app/class/Application.php +++ b/app/class/Application.php @@ -37,6 +37,7 @@ public function wakeup() echo 'Cant write config file : ' . $e->getMessage(); } header('Location: ./'); + exit; } elseif ( isset($_POST['userinit']) && !empty($_POST['userinit']['id']) diff --git a/app/class/Config.php b/app/class/Config.php index a7fc71cd..9f359ace 100644 --- a/app/class/Config.php +++ b/app/class/Config.php @@ -119,9 +119,6 @@ public static function tojson() */ public static function checkbasepath(): bool { - if (str_starts_with(self::$basepath, '/') || str_ends_with(self::$basepath, '/')) { - return false; - } $path = $_SERVER['DOCUMENT_ROOT'] . '/' . self::$basepath . '/' . Model::CONFIG_FILE; return (file_exists($path)); }