@@ -, +, @@ --- Koha/SharedContent.pm | 4 ++-- t/db_dependent/Koha/SharedContent.t | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/Koha/SharedContent.pm +++ a/Koha/SharedContent.pm @@ -154,7 +154,7 @@ sub build_request { if ( $type eq 'get' ) { my $params = shift; $params = join '&', - map { defined $params->{$_} ? $_ . "=" . $params->{$_} : () } + map { defined $params->{$_} && $params->{$_} ne '' ? $_ . "=" . $params->{$_} : () } keys %$params; my $url = "$mana_url/$resource.json?$params"; return HTTP::Request->new( GET => $url ); @@ -164,7 +164,7 @@ sub build_request { my $id = shift; my $params = shift; $params = join '&', - map { defined $params->{$_} ? $_ . "=" . $params->{$_} : () } + map { defined $params->{$_} && $params->{$_} ne '' ? $_ . "=" . $params->{$_} : () } keys %$params; my $url = "$mana_url/$resource/$id.json?$params"; --- a/t/db_dependent/Koha/SharedContent.t +++ a/t/db_dependent/Koha/SharedContent.t @@ -82,7 +82,7 @@ is($request->method, 'GET', 'Get subscription - Method is get'); my %query = $request->uri->query_form; is($query{title}, 'The English historical review', 'Check title'); is($query{issn}, '0013-8266', 'Check issn'); -is($query{ean}, '', 'Check ean'); +is($query{ean}, undef, 'Check ean'); is($query{publishercode}, 'Longman', 'Check publisher'); is($request->uri->path, '/subscription.json', 'Path is subscription'); --