diff --git a/src/Service/RisingTideGateway.php b/src/Service/RisingTideGateway.php index 2a01799c..0a4ba1aa 100644 --- a/src/Service/RisingTideGateway.php +++ b/src/Service/RisingTideGateway.php @@ -36,7 +36,9 @@ class RisingTideGateway // at this point, assume that mobile is numeric and valid mobile number $clean_num = $this->cleanPhoneNumber($mobile_num); - if ($clean_num != '') + if ($clean_num == false) + error_log('Invalid mobile number provided. Cannot send SMS message to ' . $mobile_num); + else { $headers = [ 'Content-Type: application/vnd.net.wyrls.Document-v3+json' @@ -89,8 +91,6 @@ class RisingTideGateway error_log($result); } - else - error_log('Invalid mobile number provided. Cannot send SMS message.'); } public function validatePhoneNumber($mobile) @@ -151,6 +151,6 @@ class RisingTideGateway return $clean_number; } - return ""; + return false; } }