@@ -, +, @@ --- Koha/Calendar.pm | 2 ++ Koha/DateUtils.pm | 2 +- t/db_dependent/Circulation.t | 1 + 3 files changed, 4 insertions(+), 1 deletions(-) --- a/Koha/Calendar.pm +++ a/Koha/Calendar.pm @@ -167,6 +167,8 @@ sub addDays { my ( $self, $startdate, $days_duration ) = @_; my $base_date = $startdate->clone(); + $self->{days_mode} ||= q{}; + if ( $self->{days_mode} eq 'Calendar' ) { # use the calendar to skip all days the library is closed # when adding --- a/Koha/DateUtils.pm +++ a/Koha/DateUtils.pm @@ -128,7 +128,7 @@ sub output_pref { my $pref = defined $force_pref ? $force_pref : C4::Context->preference('dateformat'); - my $time_format = $force_time || C4::Context->preference('TimeFormat'); + my $time_format = $force_time || C4::Context->preference('TimeFormat') || q{}; my $time = ( $time_format eq '12hr' ) ? '%I:%M %p' : '%H:%M'; my $date; if ( $pref =~ m/^iso/ ) { --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -291,6 +291,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); ); # Testing of feature to allow the renewal of reserved items if other items on the record can fill all needed holds + C4::Context->set_preference('AllowOnShelfHolds', 1 ); C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 1 ); ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); --