From b724d64ece60f504cf8a5d80835b3f67643df3e0 Mon Sep 17 00:00:00 2001 From: Hannes <31671206+xJuvi@users.noreply.github.com> Date: Sun, 17 Dec 2023 20:36:50 +0100 Subject: [PATCH 1/2] fix undefined GET Keys fix issue #55 --- guest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guest.php b/guest.php index 9809e35..d27069c 100644 --- a/guest.php +++ b/guest.php @@ -463,8 +463,8 @@ private function httpExit(int $code = 404) private function __construct() { - $this->client = filter_var($_GET['client_id'], FILTER_SANITIZE_STRING); - $this->refId = filter_var($_GET['ref_id'], FILTER_SANITIZE_NUMBER_INT); + $this->client = isset($_GET['client_id']) ? filter_var($_GET['client_id'], FILTER_SANITIZE_STRING); + $this->refId = isset($_GET['ref_id']) ? filter_var($_GET['ref_id'], FILTER_SANITIZE_NUMBER_INT) : 0; ilInitialisationGuest::initIlias($this->client); global $DIC; /** @var Container $DIC */ $this->dic = $DIC; From 24887e9d26e4ef2c5b822cb9667938498ab4dcd9 Mon Sep 17 00:00:00 2001 From: Hannes <31671206+xJuvi@users.noreply.github.com> Date: Sun, 17 Dec 2023 20:38:51 +0100 Subject: [PATCH 2/2] Update guest.php --- guest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guest.php b/guest.php index d27069c..42f7bc8 100644 --- a/guest.php +++ b/guest.php @@ -463,7 +463,7 @@ private function httpExit(int $code = 404) private function __construct() { - $this->client = isset($_GET['client_id']) ? filter_var($_GET['client_id'], FILTER_SANITIZE_STRING); + $this->client = isset($_GET['client_id']) ? filter_var($_GET['client_id'], FILTER_SANITIZE_STRING) : ''; $this->refId = isset($_GET['ref_id']) ? filter_var($_GET['ref_id'], FILTER_SANITIZE_NUMBER_INT) : 0; ilInitialisationGuest::initIlias($this->client); global $DIC; /** @var Container $DIC */