It seems this has been caused by
commit
1544f9a5d4a8acd47c97d7c6ac55dee8e759d3ff
Bug 18276: Remove GetBiblioFromItemNumber - circulation pages
To reproduce the problem you need switch on the two prefs
- OnSiteCheckouts
- OnSiteCheckoutsForce
Test plan:
Try to check an item out using an unknown barcode
With the 2 prefs set to on and without this patch, you will get the
following error in the log
Can't call method "materials" on an undefined value at
/home/vagrant/kohaclone/circ/circulation.pl line 387.
With this patch applied you should not get this error and a correct
behaviour for the different pref combinations.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
}
}
- unless( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") ) {
+ if ( $error->{UNKNOWN_BARCODE} or not $onsite_checkout or not C4::Context->preference("OnSiteCheckoutsForce") ) {
delete $question->{'DEBT'} if ($debt_confirmed);
foreach my $impossible ( keys %$error ) {
$template_params->{$impossible} = $$error{$impossible};
$blocker = 1;
}
}
- if( !$blocker || $force_allow_issue ){
+
+ if( $item and ( !$blocker or $force_allow_issue ) ){
my $confirm_required = 0;
unless($issueconfirmed){
# Get the item title for more information