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 <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5c905109db)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2024-05-22 11:22:06 +02:00 committed by Lucas Gass
parent a5d2239a52
commit 86ca184501
1 changed files with 1 additions and 1 deletions

View File

@ -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 {