From d96457dd338857306b6ffb14da5444b8cf08417a Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 20 Nov 2021 01:43:00 +0100 Subject: [PATCH] Fixed: Dont throw exception when deleting a couse via api --- src/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index 920da4f..8052594 100644 --- a/src/Api.php +++ b/src/Api.php @@ -268,7 +268,7 @@ class Api { { $response = $this->http()->delete(self::$url."/ica/rest/nami/mitglied-ausbildung/filtered-for-navigation/mitglied/mitglied/{$memberId}/{$courseId}"); - if (data_get($response->json(), 'success') !== true) { + if ($response->json() !== null && data_get($response->json(), 'success') !== true) { $this->exception('Course deletion failed', [], $response->json()); } }