Bug 6796: Code defensively for if library hours are not set
Sponsored-by: PTFS Europe Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
8017463d34
commit
a8c7429cb5
1 changed files with 4 additions and 0 deletions
|
@ -3911,6 +3911,10 @@ sub CalcDateDue {
|
|||
my @close = undef;
|
||||
my $tomorrowhours = Koha::Library::Hours->find( { library_id => $branch, day => $tomorrow_dayofweek } )
|
||||
; # get open hours of next day
|
||||
|
||||
# Defend against missing library hours definitions
|
||||
if ( !$todayhours || !$tomorrowhours ) { $considerlibraryhours = 'ignore' }
|
||||
|
||||
my @open = undef;
|
||||
if ( $considerlibraryhours ne 'ignore' and $todayhours->close_time and $tomorrowhours->open_time ) {
|
||||
@close = split( ":", $todayhours->close_time );
|
||||
|
|
Loading…
Reference in a new issue