Skip to content

A free open source IT asset/license management system

Hotfix: the checkin_email does not exist on consumable. (#5891)

Daniel Meltzer351274c63322
diff --git a/app/Notifications/CheckoutConsumableNotification.php b/app/Notifications/CheckoutConsumableNotification.php
index ef5ab79e4c..1811c70401 100644
--- a/app/Notifications/CheckoutConsumableNotification.php
+++ b/app/Notifications/CheckoutConsumableNotification.php
@@ -80,7 +80,7 @@ class CheckoutConsumableNotification extends Notification
/**
* Send an email if an email should be sent at checkin/checkout
*/
- if ($this->item->checkin_email()) {
+ if ((method_exists($this->item, 'checkin_email')) && ($this->item->checkin_email())) {
$notifyBy[1] = 'mail';
}