Commit 931c550e authored by Tuomas Välimaa's avatar Tuomas Välimaa Committed by Paulo Henrique Cota Starling
Browse files

Issue #3281294 by tvalimaa: TypeError: array_combine(): Argument #1 ($keys)...

Issue #3281294 by tvalimaa: TypeError: array_combine(): Argument #1 ($keys) must be of type array, string given in array_combine(
parent 95e59f06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ function _password_policy_get_edited_user_roles(&$form, FormStateInterface $form
    // Get if from $form; form state is always empty the first time.
    $roles = $form['account']['roles']['#default_value'];
  }
  $roles = array_combine($roles, $roles);
  $roles = (is_array($roles)) ? array_combine($roles, $roles) : [$roles];

  // Add user doesn't automatically register authenticated, so lets add it.
  if (empty($roles)) {