diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme
index ba41e6d7c86c95354a5e8442404c7580f2a53074..73da194e62055d6b328f494b68cec471a9fa9c65 100644
--- a/core/themes/claro/claro.theme
+++ b/core/themes/claro/claro.theme
@@ -966,12 +966,12 @@ function claro_preprocess_form_element__password_confirm(&$variables) {
  * Implements hook_preprocess_HOOK() for form_element__password.
  */
 function claro_preprocess_form_element__password(&$variables) {
-  if (!empty($variables['element']['#array_parents']) && in_array('pass1', $variables['element']['#array_parents'])) {
+  if (!empty($variables['element']['#array_parents']) && in_array('pass1', $variables['element']['#array_parents'], TRUE)) {
     // This is the main password form element.
     $variables['attributes']['class'][] = 'password-confirm__password';
   }
 
-  if (!empty($variables['element']['#array_parents']) && in_array('pass2', $variables['element']['#array_parents'])) {
+  if (!empty($variables['element']['#array_parents']) && in_array('pass2', $variables['element']['#array_parents'], TRUE)) {
     // This is the password confirm form element.
     $variables['attributes']['class'][] = 'password-confirm__confirm';
   }