From 256a52a5da57dc618f14c769726877ee45b47231 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sat, 11 Feb 2023 08:54:09 +0100 Subject: [PATCH] fix setting incorrect acme-challenge path on installation; fixes #1097 Signed-off-by: Michael Kaufmann --- lib/Froxlor/Install/Install/Core.php | 2 +- lib/Froxlor/PhpHelper.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Froxlor/Install/Install/Core.php b/lib/Froxlor/Install/Install/Core.php index 234f4ae2..3ba10023 100644 --- a/lib/Froxlor/Install/Install/Core.php +++ b/lib/Froxlor/Install/Install/Core.php @@ -420,7 +420,7 @@ class Core } $this->updateSetting($upd_stmt, $this->validatedData['activate_newsfeed'], 'admin', 'show_news_feed'); - $this->updateSetting($upd_stmt, dirname(__FILE__, 3), 'system', 'letsencryptchallengepath'); + $this->updateSetting($upd_stmt, dirname(__FILE__, 5), 'system', 'letsencryptchallengepath'); // insert the lastcronrun to be the installation date $this->updateSetting($upd_stmt, time(), 'system', 'lastcronrun'); diff --git a/lib/Froxlor/PhpHelper.php b/lib/Froxlor/PhpHelper.php index 33b1a685..5db40948 100644 --- a/lib/Froxlor/PhpHelper.php +++ b/lib/Froxlor/PhpHelper.php @@ -324,7 +324,7 @@ class PhpHelper * Return human-readable sizes * * @param int $size size in bytes - * @param string $max maximum unit + * @param ?string $max maximum unit * @param string $system 'si' for SI, 'bi' for binary prefixes * @param string $retstring string-format * @@ -332,7 +332,7 @@ class PhpHelper */ public static function sizeReadable( int $size, - string $max = '', + ?string $max = '', string $system = 'si', string $retstring = '%01.2f %s' ): string {