From e20b2cacdbf01f0522d61d8a3f9639819b1a9653 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 17 Oct 2019 20:03:38 +0100 Subject: [PATCH] psalm fix --- public/users/password-recover.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/users/password-recover.php b/public/users/password-recover.php index dfb23f45..78d42db9 100644 --- a/public/users/password-recover.php +++ b/public/users/password-recover.php @@ -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; }