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>
(cherry picked from commit 699ba06eb7)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
Emily Lamancusa 2026-03-23 13:22:04 -04:00 committed by Wainui Witika-Park
parent 705e2083d3
commit b3f525497b
No known key found for this signature in database
GPG Key ID: 2D0A6AB5DAF1B78D
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,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 )