LP#1694696 - Check for blank SMS Carriers in A/T reactor
authorChris Sharp <csharp@georgialibraries.org>
Wed, 31 May 2017 12:22:58 +0000 (08:22 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 31 May 2017 12:33:11 +0000 (08:33 -0400)
Currently, the get_sms_gateway_email subroutine does not check
for the truthiness of sms_carrier, which can result in catastrophic
failure for a running server.  This adds that check.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm

index 7b96edb..9e0ab9a 100644 (file)
@@ -373,7 +373,7 @@ $_TT_helpers = {
         my $sms_carrier = shift;
         my $sms_notify = shift;
 
-        if (! defined $sms_notify || $sms_notify eq '') {
+        if (! defined $sms_notify || $sms_notify eq '' || ! defined $sms_carrier || $sms_carrier eq '') {
             return '';
         }