From 1609f4bff4c1eb1074be2b6130b2faa65ffeea83 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 22 May 2024 11:22:06 +0200 Subject: [PATCH] Bug 36919: Remove a warning from Koha/Object.t Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Patron.pm line 446. Signed-off-by: David Nind Signed-off-by: Lucas Gass --- Koha/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 7234a3be5bc..3e4e89c7990 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -443,7 +443,7 @@ sub delete { Koha::Exceptions::Patron::FailedDeleteAnonymousPatron->throw() if $anonymous_patron && $self->id eq $anonymous_patron; # Check if patron is protected - Koha::Exceptions::Patron::FailedDeleteProtectedPatron->throw() if $self->protected == 1; + Koha::Exceptions::Patron::FailedDeleteProtectedPatron->throw() if defined $self->protected && $self->protected == 1; $self->_result->result_source->schema->txn_do( sub { -- 2.39.2