From: Benjamin Collet Date: Thu, 14 Dec 2017 17:02:37 +0000 (+0100) Subject: Check if the auth module supports check_password() method before using it X-Git-Tag: 18.8~101^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=44c6a04b61a25c3ab97dcc429dcec7f706dd3ce5;p=tt-rss.git Check if the auth module supports check_password() method before using it --- diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 50d20490..7a61b6f1 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -922,7 +922,7 @@ class Pref_Prefs extends Handler_Protected { static function isdefaultpassword() { $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]); - if ($authenticator && $authenticator->check_password($_SESSION["uid"], "password")) { + if ($authenticator && function_exists($authenticator->check_password) $authenticator->check_password($_SESSION["uid"], "password")) { return true; } @@ -1125,4 +1125,4 @@ class Pref_Prefs extends Handler_Protected { return ""; } -} \ No newline at end of file +}