From a512481af30e038cd694a4a2e771eb4ab8192ed9 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sun, 18 Aug 2013 12:41:18 -0400 Subject: [PATCH] Bug 5202: (follow-up) Quiet warning $mergereference is not always defined, so we should check it is defined before checking its value. Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- authorities/merge.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorities/merge.pl b/authorities/merge.pl index 0c7a7ead9f..be24c8eca0 100755 --- a/authorities/merge.pl +++ b/authorities/merge.pl @@ -94,7 +94,7 @@ else { my $recordObj1 = Koha::Authority->get_from_authid($authid[0]) || Koha::Authority->new(); my $recordObj2; - if ($mergereference eq 'breeding') { + if (defined $mergereference && $mergereference eq 'breeding') { $recordObj2 = Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new(); } else { $recordObj2 = Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new(); -- 2.39.5