From 883fbaee76b6095f7ea8302d8a3187a4aeecc5de Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Tue, 11 Aug 2026 15:10:37 +0200 Subject: [PATCH] removed use of retval from freebusy controller --- .../controllers/api/frontend/v1/coodle/FreeBusy.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/controllers/api/frontend/v1/coodle/FreeBusy.php b/application/controllers/api/frontend/v1/coodle/FreeBusy.php index 060c92391..03ddd2ce9 100644 --- a/application/controllers/api/frontend/v1/coodle/FreeBusy.php +++ b/application/controllers/api/frontend/v1/coodle/FreeBusy.php @@ -126,7 +126,9 @@ class FreeBusy extends FHCAPI_Controller $this->terminateWithError($this->p->t("coodle", "url_not_working")); } - $existingFreeBusyEntry = $this->FreeBusyModel->load($id)->retval[0]; + $existingFreeBusyEntryResult = $this->FreeBusyModel->load($id); + $existingFreeBusyEntry = $this->getDataOrTerminateWithError($existingFreeBusyEntryResult); + $existingFreeBusyEntry = $existingFreeBusyEntry && count($existingFreeBusyEntry) ? $existingFreeBusyEntry[0] : null; if (!$existingFreeBusyEntry) { $this->terminateWithError("FreeBusy entry not found!"); } else if ($existingFreeBusyEntry->uid !== getAuthUID()) { @@ -151,7 +153,9 @@ class FreeBusy extends FHCAPI_Controller { $id = $this->input->post("id"); - $existingFreeBusyEntry = $this->FreeBusyModel->load($id)->retval[0]; + $existingFreeBusyEntryResult = $this->FreeBusyModel->load($id); + $existingFreeBusyEntry = $this->getDataOrTerminateWithError($existingFreeBusyEntryResult); + $existingFreeBusyEntry = $existingFreeBusyEntry && count($existingFreeBusyEntry) ? $existingFreeBusyEntry[0] : null; if (!$existingFreeBusyEntry) { $this->terminateWithError("FreeBusy entry not found!"); } else if ($existingFreeBusyEntry->uid !== getAuthUID()) {