From db09839320ce94a79f06f7d39009b1bc8f9cac7b Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Mon, 2 Dec 2024 08:00:07 +0100 Subject: [PATCH] fix: check of possible undefined save method --- src/QUI/ERP/Coupons/Events.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/QUI/ERP/Coupons/Events.php b/src/QUI/ERP/Coupons/Events.php index 2451503..d528a83 100644 --- a/src/QUI/ERP/Coupons/Events.php +++ b/src/QUI/ERP/Coupons/Events.php @@ -27,6 +27,7 @@ use function is_string; use function json_decode; use function json_encode; +use function method_exists; /** * Class Events @@ -213,7 +214,9 @@ public static function onQuiqqerOrderBasketRemovePos( $Order->setData('quiqqer-coupons', $orderCoupons); try { - $Order->save(); + if (method_exists($Order, 'save')) { + $Order->save(); + } } catch (QUI\Exception) { } } -- GitLab