Skip to content

Instantly share code, notes, and snippets.

@ahebrank
Created September 20, 2017 15:06
Show Gist options
  • Select an option

  • Save ahebrank/a4e1ea2cf385fae2b3e6c6c1019ad414 to your computer and use it in GitHub Desktop.

Select an option

Save ahebrank/a4e1ea2cf385fae2b3e6c6c1019ad414 to your computer and use it in GitHub Desktop.
xdebug break for core element.php invalid attribute
diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php
index e394a39..32755f2 100644
--- a/core/lib/Drupal/Core/Render/Element.php
+++ b/core/lib/Drupal/Core/Render/Element.php
@@ -94,6 +94,7 @@ 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)) {
+ xdebug_break();
trigger_error(SafeMarkup::format('"@key" is an invalid render array key', ['@key' => $key]), E_USER_ERROR);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment