Skip to content
Snippets Groups Projects
Commit f1132890 authored by catch's avatar catch
Browse files

Issue #3177546 by alexpott:...

Issue #3177546 by alexpott: \Drupal\views\Plugin\views\PluginBase::listLanguages() incorrectly uses in_array() resulting in listing additional languages
parent a33344f9
Branches
Tags
7 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage"
......@@ -31,7 +31,7 @@ public function testFilter() {
'id' => 'langcode',
'table' => 'views_test_data',
'field' => 'langcode',
'value' => [$langcode],
'value' => [$langcode => $langcode],
],
]);
$this->executeView($view);
......@@ -44,7 +44,6 @@ public function testFilter() {
$expected = [
'***LANGUAGE_site_default***',
'***LANGUAGE_language_interface***',
'***LANGUAGE_language_content***',
'en',
'xx-lolspeak',
'und',
......
......@@ -603,7 +603,7 @@ protected function listLanguages($flags = LanguageInterface::STATE_ALL, array $c
// If this (non-configurable) type is among the current values,
// add that option too, so it is not lost. If not among the current
// values, skip displaying it to avoid user confusion.
if (isset($type['name']) && !isset($list[$id]) && in_array($id, $current_values)) {
if (isset($type['name']) && !isset($list[$id]) && in_array($id, $current_values, TRUE)) {
$list[$id] = $this->t('@type language selected for page', ['@type' => $type['name']]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment