* deal with some phpstan warnings in base plugin class

* arguably better hack for incompatible plugins causing E_COMPILE_ERROR
This commit is contained in:
Andrew Dolgov
2021-11-14 16:49:10 +03:00
parent c3ffa08807
commit af2f4460ce
3 changed files with 108 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ class Pref_Prefs extends Handler_Protected {
const PI_ERR_PLUGIN_NOT_FOUND = "PI_ERR_PLUGIN_NOT_FOUND";
const PI_ERR_NO_WORKDIR = "PI_ERR_NO_WORKDIR";
function csrf_ignore(string $method): bool {
function csrf_ignore($method) : bool {
$csrf_ignored = array("index", "updateself", "otpqrcode");
return array_search($method, $csrf_ignored) !== false;