Bug 5202: (follow-up) Quiet warning
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 18 Aug 2013 16:41:18 +0000 (12:41 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 10 Oct 2013 21:38:11 +0000 (21:38 +0000)
$mergereference is not always defined, so we should check it is
defined before checking its value.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
authorities/merge.pl

index 0c7a7ea..be24c8e 100755 (executable)
@@ -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();