https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22291
Bug ID: 22291
Summary: 'Batch modify' button on itemnumber causes internal
server error if itemnumbers do not correspond to real
items.
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Reports
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
To re-create:
Create a new report from SQL using the following query:
select
title,
itemnumber + 1 as itemnumber
from biblio inner join items using (biblionumber)
order by itemnumber desc
LIMIT 1
The value in the itemnumber column will *not* correspond to any item in the
items table.
Run the report and click the 'Batch modify' button.
This causes an internal server error with the following error message:
Can't call method "title" on an undefined value at
/usr/share/koha/intranet/cgi-bin/tools/batchMod.pl line 583.
The problem is that 'my $biblio = Koha::Biblios->find(
$itemdata->{biblionumber}' at line 577 *can't* be guaranteed to return a valid
biblio record, so we *must* check whether it's defined before we access its
members.
575 # grab title, author, and ISBN to identify bib that the item
576 # belongs to in the display
577 my $biblio = Koha::Biblios->find( $itemdata->{biblionumber}
);
>>578 $this_row{title} = $biblio->title;
579 $this_row{author} = $biblio->author;
580 $this_row{isbn} = $biblio->biblioitem->isbn;
581 $this_row{biblionumber} = $biblio->biblionumber;
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/