Improve error message and return value. #658
This commit is contained in:
parent
a6add363bd
commit
6fff162c0e
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue