Skip to content
Snippets Groups Projects

Issue #3083690 by gxleano: Update trigger error message

Open David Galeano requested to merge issue/drupal-3083690:3083690-key-is-an into 11.x
Files
2
@@ -95,7 +95,13 @@ public static function children(array &$elements, $sort = FALSE) {
// Only trigger an error if the value is not null.
// @see https://www.drupal.org/node/1283892
elseif (isset($value)) {
trigger_error(new FormattableMarkup('"@key" is an invalid render array key', ['@key' => $key]), E_USER_ERROR);
trigger_error(new FormattableMarkup(
'"@key" is an invalid render array key. Value should be an array but got a @type',
[
'@key' => $key,
'@type' => gettype($value),
]
), E_USER_ERROR);
}
}
$i++;
Loading