Bug 27346 - get_xisbns explodes if only pref ThingISBN is set
Summary: get_xisbns explodes if only pref ThingISBN is set
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-05 14:49 UTC by Fridolin Somers
Modified: 2021-01-06 10:14 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-01-05 14:49:15 UTC
When using ThingISBN alone you get a warning :

Failed Can't use string ("1") as a HASH ref while "strict refs" in use at /home/koha/src/C4/XISBN.pm line 99.

sub get_xisbns {
    my ( $isbn, $biblionumber ) = @_;
    my ($response,$thing_response,$syndetics_response,$errors);
...
    $response->{isbn} = [ @{ $syndetics_response->{isbn} or [] }, @{ $thing_response->{isbn} or [] } ];

Vars $thing_response,$syndetics_response must be initialised as an hashref.
Or maybe rewrite a bit this code.