From ff60284b0100f8fbda6f16a5f7354358073985dd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Apr 2021 14:32:12 +0200 Subject: [PATCH] Bug 26498: Add default values Just in case Signed-off-by: Jonathan Druart --- Koha/Hold.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 46aee1aace..a7455a44a4 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -606,9 +606,9 @@ sub store { sub _set_default_expirationdate { my $self = shift; - my $period = C4::Context->preference('DefaultHoldExpirationdatePeriod'); + my $period = C4::Context->preference('DefaultHoldExpirationdatePeriod') || 0; my $timeunit = - C4::Context->preference('DefaultHoldExpirationdateUnitOfTime'); + C4::Context->preference('DefaultHoldExpirationdateUnitOfTime') || 'days'; $self->expirationdate( dt_from_string( $self->reservedate )->add( $timeunit => $period ) ); -- 2.39.5