Commit 239666bc authored by Harsh Panchal's avatar Harsh Panchal Committed by Shaun Dychko
Browse files

Issue #3292373 by Harsh panchal: key_exists() is a function name alias, use...

Issue #3292373 by Harsh panchal: key_exists() is a function name alias, use array_key_exists() instead
parent 48c8c310
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ function decoupled_cookie_auth_user_update(User $user) {
 * Alter the [site:login-url] token to point to the frontend login page.
 */
function decoupled_cookie_auth_tokens_alter(array &$replacements, array $context, BubbleableMetadata $bubbleable_metadata) {
  if ($context['type'] === 'site' && key_exists('login-url', $context['tokens'])) {
  if ($context['type'] === 'site' && array_key_exists('login-url', $context['tokens'])) {
    $config = \Drupal::config('decoupled_cookie_auth.configuration');
    $replacements[$context['tokens']['login-url']] = $config->get('frontend_url') . $config->get('frontend_login');
  }