diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index a0712df2731..3343254563d 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -1584,24 +1584,6 @@ parameters: count: 1 path: ../../htdocs/admin/oauthlogintokens.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 5 - path: ../../htdocs/admin/openid_connect.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 5 - path: ../../htdocs/admin/openid_connect.php - - - - message: '#^Variable \$bc might not be defined\.$#' - identifier: variable.undefined - count: 10 - path: ../../htdocs/admin/openid_connect.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue diff --git a/htdocs/admin/openid_connect.php b/htdocs/admin/openid_connect.php index 7a42c90369d..c5f80897c5e 100644 --- a/htdocs/admin/openid_connect.php +++ b/htdocs/admin/openid_connect.php @@ -37,10 +37,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/openid_connect.lib.php'; * @var User $user */ -$langs->load("admin"); -$langs->load("openidconnect"); +$langs->loadLangs(["admin", "openidconnect"]); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'alpha'); @@ -143,8 +144,6 @@ print '