Bug 19536: Odd number of elements in anonymous hash in svc/bib
Resolve: Odd number of elements in anonymous hash at svc/bib line 69. Odd number of elements in anonymous hash at svc/bib line 118. You can see such warnings when testing the Rancor editor. Replacing url_param by param in fetch_bib since it is a GET call. Not sure about doing the same in update_bib since that is a POST. The scalar context will resolve the odd number warns. Adding a scalar in svc/new_bib too. Test plan: Try URL /cgi-bin/koha/svc/bib/[number] with and without the patch. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
b780a14ad9
commit
fbcf911f0b
4
svc/bib
4
svc/bib
|
|
@ -68,7 +68,7 @@ sub fetch_bib {
|
|||
my $biblionumber = shift;
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $query->url_param('items') });
|
||||
embed_items => scalar $query->param('items') });
|
||||
if (defined $record) {
|
||||
print $query->header(-type => 'text/xml',-charset => 'utf-8',);
|
||||
print $record->as_xml_record();
|
||||
|
|
@ -117,7 +117,7 @@ sub update_bib {
|
|||
ModBiblio( $record, $biblionumber, '' );
|
||||
my $new_record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $query->url_param('items') });
|
||||
embed_items => scalar $query->url_param('items') });
|
||||
|
||||
$result->{'status'} = "ok";
|
||||
$result->{'biblionumber'} = $biblionumber;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ sub add_bib {
|
|||
|
||||
$new_record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $query->url_param('items') });
|
||||
embed_items => scalar $query->url_param('items') });
|
||||
$result->{'status'} = "ok";
|
||||
$result->{'biblionumber'} = $biblionumber;
|
||||
my $xml = $new_record->as_xml_record();
|
||||
|
|
|
|||
Loading…
Reference in New Issue