From 0dc1aaf09d4c580f352c7bd948393b89118c3cf1 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 26 Sep 2023 09:35:01 +0000 Subject: [PATCH] Bug 34838: Only check for status in status graph if request has a status This check is required because when the existing_statuses method checks for the existing status_alias, it'll leave out the status from the query, so the status will be NULL for those particular query results when calling strings_map, throwing a warning Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize (cherry picked from commit 3caabe886ec0c1d6967c42480efeb244e995cd7e) Signed-off-by: Lucas Gass --- Koha/ILL/Request.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm index e0a9456dc3..e929105ed2 100644 --- a/Koha/ILL/Request.pm +++ b/Koha/ILL/Request.pm @@ -2073,12 +2073,12 @@ sub strings_map { } my $status_string = - ( exists $status_graph_union->{ $self->status } && defined $status_graph_union->{ $self->status }->{name} ) + ( $self->status && exists $status_graph_union->{ $self->status } && defined $status_graph_union->{ $self->status }->{name} ) ? $status_graph_union->{ $self->status }->{name} : $self->status; my $status_code = - ( exists $status_graph_union->{ $self->status } && defined $status_graph_union->{ $self->status }->{id} ) + ( $self->status && exists $status_graph_union->{ $self->status } && defined $status_graph_union->{ $self->status }->{id} ) ? $status_graph_union->{ $self->status }->{id} : $self->status; -- 2.39.5