diff --git a/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php b/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php index 1e23df4..df96fb3 100644 --- a/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php +++ b/core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php @@ -150,13 +150,11 @@ protected function getPluralIndex() { // Pickup index provided by the most weighted module returning a valid // value. - if ($indexes) { - do { - $index = array_pop($indexes); - if (is_integer($index) && $index >= 0) { - return $index; - } - } while ($indexes); + while ($indexes) { + $index = array_pop($indexes); + if (is_integer($index) && $index >= 0) { + return $index; + } } // Return -1 if no module has implemented valid plural formulas. return -1;