diff --git a/core/drupalci.yml b/core/drupalci.yml index 893046afce..7621541666 100644 --- a/core/drupalci.yml +++ b/core/drupalci.yml @@ -43,20 +43,20 @@ build: testgroups: '--all' suppress-deprecations: false halt-on-fail: false -# run_tests.functional: -# types: 'PHPUnit-Functional' -# testgroups: '--all' -# suppress-deprecations: false -# halt-on-fail: false -# run_tests.javascript: -# concurrency: 15 -# types: 'PHPUnit-FunctionalJavascript' -# testgroups: '--all' -# suppress-deprecations: false -# halt-on-fail: false -# # Run nightwatch testing. -# # @see https://www.drupal.org/project/drupal/issues/2869825 -# nightwatchjs: + run_tests.functional: + types: 'PHPUnit-Functional' + testgroups: '--all' + suppress-deprecations: false + halt-on-fail: false + run_tests.javascript: + concurrency: 15 + types: 'PHPUnit-FunctionalJavascript' + testgroups: '--all' + suppress-deprecations: false + halt-on-fail: false + # Run nightwatch testing. + # @see https://www.drupal.org/project/drupal/issues/2869825 + nightwatchjs: # container_command.drupal_project_templates: # commands: # - "sudo -u www-data ${SOURCE_DIR}/core/tests/scripts/test_composer_project_templates.sh" diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 34508bcce0..4b666f5e79 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1128,7 +1128,8 @@ function template_preprocess_item_list(&$variables) { // \Drupal\Core\Render\Element::children(), which cannot be used // here, since it triggers an error on string values. foreach ($child as $child_key => $child_value) { - if (is_string($child_key) && $child_key[0] !== '#') { + $child_key = (string) $child_key; + if ($child_key[0] !== '#') { $child['#items'][$child_key] = $child_value; unset($child[$child_key]); } diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php index 02c3b038dd..5322deba91 100644 --- a/core/lib/Drupal/Core/Render/Element.php +++ b/core/lib/Drupal/Core/Render/Element.php @@ -78,7 +78,8 @@ public static function children(array &$elements, $sort = FALSE) { $i = 0; $sortable = FALSE; foreach ($elements as $key => $value) { - if ($key === '' || (is_string($key) && $key[0] !== '#')) { + $key = (string) $key; + if ($key === '' || $key[0] !== '#') { if (is_array($value)) { if (isset($value['#weight'])) { $weight = $value['#weight']; diff --git a/core/lib/Drupal/Core/Security/RequestSanitizer.php b/core/lib/Drupal/Core/Security/RequestSanitizer.php index e1626ed383..87fc93c623 100644 --- a/core/lib/Drupal/Core/Security/RequestSanitizer.php +++ b/core/lib/Drupal/Core/Security/RequestSanitizer.php @@ -153,6 +153,7 @@ protected static function checkDestination($destination, array $whitelist) { protected static function stripDangerousValues($input, array $whitelist, array &$sanitized_keys) { if (is_array($input)) { foreach ($input as $key => $value) { + $key = (string) $key; if ($key !== '' && $key[0] === '#' && !in_array($key, $whitelist, TRUE)) { unset($input[$key]); $sanitized_keys[] = $key;