Use of uninitialized value $record_restrictions in uc at /kohadevbox/koha/C4/Circulation.pm line 3981
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
my ($record_restrictions, $borrower) = @_;
my $markers = C4::Context->preference('AgeRestrictionMarker');
+ return unless $record_restrictions;
# Split $record_restrictions to something like FSK 16 or PEGI 6
my @values = split ' ', uc($record_restrictions);
return unless @values;
use Modern::Perl;
use DateTime;
-use Test::More tests => 7;
+use Test::More tests => 8;
+use Test::Warn;
use t::lib::Mocks;
}
};
+subtest 'No age restriction' => sub {
+ plan tests => 1;
+
+ warning_is {
+ C4::Circulation::GetAgeRestriction();
+ }
+ undef, "No warning if GetAgeRestriction is called without restriction";
+
+};
+
# The Patron tests
sub TestPatron {
my ($borrower,$offset) = @_;