From 5c223409fd0df99138125e81bda23f4d3509c02c Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Fri, 2 Jan 2026 11:22:46 +0100 Subject: [PATCH] Bug 41510: Handle undefined itemtype in item->effective_bookable - Guard against undefined itemtype before calling ->bookable on it - Return 0 (not bookable) when no itemtype is found and item-level bookable is not defined Signed-off-by: David Nind --- Koha/Item.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index d2b92c1956..9ebfe6c817 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -2066,7 +2066,9 @@ Returns the effective bookability of the current item, be that item or itemtype sub effective_bookable { my ($self) = @_; - return $self->bookable // $self->itemtype->bookable; + return $self->bookable if defined $self->bookable; + return $self->itemtype->bookable if $self->itemtype; + return 0; } =head3 orders -- 2.39.5