From ca3f2fb24b581c28d78d9d8ab0c104ce2a9564cc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 26 Oct 2022 15:04:40 +0200 Subject: [PATCH] Bug 32030: Remove warnings from tests Use of uninitialized value $provider in string eq Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- Koha/REST/V1/ERM/EHoldings/Packages.pm | 6 +++--- Koha/REST/V1/ERM/EHoldings/Titles.pm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Koha/REST/V1/ERM/EHoldings/Packages.pm b/Koha/REST/V1/ERM/EHoldings/Packages.pm index 9552e0c933..1dc3e747e8 100644 --- a/Koha/REST/V1/ERM/EHoldings/Packages.pm +++ b/Koha/REST/V1/ERM/EHoldings/Packages.pm @@ -71,7 +71,7 @@ sub add { my $c = shift->openapi->valid_input or return; my $provider = $c->validation->param('provider'); - if ( $provider eq 'ebsco' ) { + if ( $provider && $provider eq 'ebsco' ) { die "invalid action"; } else { return Koha::REST::V1::ERM::EHoldings::Packages::Local::add($c); @@ -88,7 +88,7 @@ sub update { my $c = shift->openapi->valid_input or return; my $provider = $c->validation->param('provider'); - if ( $provider eq 'ebsco' ) { + if ( $provider && $provider eq 'ebsco' ) { die "invalid action"; } else { return Koha::REST::V1::ERM::EHoldings::Packages::Local::update($c); @@ -103,7 +103,7 @@ sub delete { my $c = shift->openapi->valid_input or return; my $provider = $c->validation->param('provider'); - if ( $provider eq 'ebsco' ) { + if ( $provider && $provider eq 'ebsco' ) { die "invalid action"; } else { return Koha::REST::V1::ERM::EHoldings::Packages::Local::delete($c); diff --git a/Koha/REST/V1/ERM/EHoldings/Titles.pm b/Koha/REST/V1/ERM/EHoldings/Titles.pm index 8eecf3fea4..97a3f0bb2d 100644 --- a/Koha/REST/V1/ERM/EHoldings/Titles.pm +++ b/Koha/REST/V1/ERM/EHoldings/Titles.pm @@ -71,7 +71,7 @@ sub add{ my $c = shift->openapi->valid_input or return; my $provider = $c->validation->param('provider'); - if ( $provider eq 'ebsco' ) { + if ( $provider && $provider eq 'ebsco' ) { die "invalid action"; } else { return Koha::REST::V1::ERM::EHoldings::Titles::Local::add($c); @@ -89,7 +89,7 @@ sub update { my $c = shift->openapi->valid_input or return; my $provider = $c->validation->param('provider'); - if ( $provider eq 'ebsco' ) { + if ( $provider && $provider eq 'ebsco' ) { die "invalid action"; } else { return Koha::REST::V1::ERM::EHoldings::Titles::Local::update($c); @@ -104,7 +104,7 @@ sub delete { my $c = shift->openapi->valid_input or return; my $provider = $c->validation->param('provider'); - if ( $provider eq 'ebsco' ) { + if ( $provider && $provider eq 'ebsco' ) { die "invalid action"; } else { return Koha::REST::V1::ERM::EHoldings::Titles::Local::delete($c); -- 2.39.5