Bug 41386: (QA follow-up) Make sure charge is defined

Check that $charge is defined before comparing, to avoid "argument isn't
numeric" error if no charge is defined.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Emily Lamancusa 2026-03-23 13:22:04 -04:00 committed by Martin Renvoize
parent b33a7c1df4
commit 699ba06eb7
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 1 additions and 1 deletions

View File

@ -969,7 +969,7 @@ sub cancel {
type => 'RESERVE_EXPIRED',
item_id => $self->itemnumber
}
) if $charge > 0;
) if $charge && $charge > 0;
}
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, $self, undef, $original )