]> git.wh0rd.org - tt-rss.git/commitdiff
isdefaultpassword: use method_exists() to check for check_password
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Fri, 15 Dec 2017 09:15:15 +0000 (12:15 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Fri, 15 Dec 2017 09:15:15 +0000 (12:15 +0300)
classes/pref/prefs.php

index fca67d0a6c3056e0a75eeaf9dd6bf485bd6e1d4c..fac4b941bb9f99219d6f23ab988c56c1fd785cde 100644 (file)
@@ -922,7 +922,10 @@ class Pref_Prefs extends Handler_Protected {
        static function isdefaultpassword() {
                $authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]);
 
-               if ($authenticator && function_exists($authenticator->check_password) && $authenticator->check_password($_SESSION["uid"], "password")) {
+               if ($authenticator &&
+                method_exists($authenticator, "check_password") &&
+                $authenticator->check_password($_SESSION["uid"], "password")) {
+
                        return true;
                }