From 5c905109dbeaae6aaadbcdd0f2670e7c0bd437fe 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 Signed-off-by: Katrin Fischer --- Koha/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 7234a3be5b..3e4e89c799 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.5