From 075c8a7c0d70a15e4ebe464c1152270b4ac4a069 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Fri, 13 Oct 2023 14:30:36 +0300 Subject: [PATCH 2/3] Bug 29074: Prevent undef warning when DefaultHoldExpirationdate is read Test plan: Repeat test plan from first patch. Also prove t/db_dependent/Hold.t. Sponsored-by: Koha-Suomi Oy Signed-off-by: Lucas Gass --- Koha/Hold.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 9be57da4d9..2c9d64fa56 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -949,6 +949,7 @@ sub store { } if ( C4::Context->preference('DefaultHoldExpirationdate') + && defined C4::Context->preference('DefaultHoldExpirationdatePeriod') && C4::Context->preference('DefaultHoldExpirationdatePeriod') ne '' && !$self->expirationdate ) { @@ -962,6 +963,7 @@ sub store { if ( ( C4::Context->preference('DefaultHoldExpirationdate') + && defined C4::Context->preference('DefaultHoldExpirationdatePeriod') && C4::Context->preference('DefaultHoldExpirationdatePeriod') ne '' && ( !exists $updated_columns{expirationdate} || $hold_reverted ) ) -- 2.34.1