Bug 8176 [SIGNED-OFF] Assign an intial value to $sqlwhere
[koha.git] / C4 / Serials.pm
index ba0397c..af5c833 100644 (file)
@@ -566,7 +566,7 @@ sub GetSubscriptions {
             LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber
     );
     my @bind_params;
-    my $sqlwhere;
+    my $sqlwhere = q{};
     if ($biblionumber) {
         $sqlwhere = "   WHERE biblio.biblionumber=?";
         push @bind_params, $biblionumber;
@@ -1073,7 +1073,8 @@ sub ModSerialStatus {
 
 # check if an alert must be sent... (= a letter is defined & status became "arrived"
         if ( $val->{letter} && $status == 2 && $oldstatus != 2 ) {
-            SendAlerts( 'issue', $val->{subscriptionid}, $val->{letter} );
+            require C4::Letters;
+            C4::Letters::SendAlerts( 'issue', $val->{subscriptionid}, $val->{letter} );
         }
     }
     return;