0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00

psalm fix

This commit is contained in:
David Goodwin 2019-10-17 20:03:38 +01:00
parent 174b874c56
commit e20b2cacdb

View File

@ -51,11 +51,11 @@ function sendCodebyEmail($to, $username, $code) {
function sendCodebySMS($to, $username, $code) {
$text = Config::lang_f('pPassword_recovery_sms_body', $code);
if (Config::read('sms_send_function') && is_callable(Config::read('sms_send_function'))) {
$result = call_user_func(Config::read('sms_send_function'), $to, $text);
$function = Config::read('sms_send_function');
if($function && is_callable($function)) {
$result = $function($to, $text);
return $result !== false;
}
return false;
}