From da0da6118b04a3b0bd4d12d6b96c25a4fa15d14c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 7 Feb 2024 15:06:17 +0100 Subject: [roomplanner] Fix passed type to runmode --- modules-available/roomplanner/page.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules-available') diff --git a/modules-available/roomplanner/page.inc.php b/modules-available/roomplanner/page.inc.php index 902df139..94bc3f78 100644 --- a/modules-available/roomplanner/page.inc.php +++ b/modules-available/roomplanner/page.inc.php @@ -339,7 +339,7 @@ class Page_Roomplanner extends Page } } - protected function saveRoomConfig($furniture, $tutorUuid) + protected function saveRoomConfig(?array $furniture, ?string $tutorUuid) { $obj = json_encode(['furniture' => $furniture]); $managerIp = Request::post('managerip', '', 'string'); @@ -350,10 +350,10 @@ class Page_Roomplanner extends Page 'locationid' => $this->locationid, 'roomplan' => $obj, 'managerip' => $managerIp, - 'tutoruuid' => $tutorUuid + 'tutoruuid' => $tutorUuid, ]); // See if the client is known, set run-mode - RunMode::deleteMode(Page::getModule(), $this->locationid); + RunMode::deleteMode(Page::getModule(), (string)$this->locationid); if (!empty($managerIp)) { $pc = Statistics::getMachinesByIp($managerIp, Machine::NO_DATA, 'lastseen DESC'); if (!empty($pc)) { @@ -379,7 +379,7 @@ class Page_Roomplanner extends Page /** * @return array{computers: array} */ - protected function getMachinesOnPlan(string $tutorUuid): array + protected function getMachinesOnPlan(?string $tutorUuid): array { $result = Database::simpleQuery('SELECT machineuuid, macaddr, clientip, hostname, position FROM machine -- cgit v1.2.3-55-g7522