Skip to content

Instantly share code, notes, and snippets.

@bdlangton
Last active March 4, 2020 22:46
Show Gist options
  • Save bdlangton/f573a7af32981175a5a424272faa6f86 to your computer and use it in GitHub Desktop.
Save bdlangton/f573a7af32981175a5a424272faa6f86 to your computer and use it in GitHub Desktop.
Drupal: dpm backtrace any errors
// This function exists in includes/bootstrap.inc.
// Just need to add lines 6-7 to it.
function _drupal_error_handler($error_level, $message, $filename, $line, $context) {
require_once DRUPAL_ROOT . '/includes/errors.inc';
$d = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
dpm($d, $message);
_drupal_error_handler_real($error_level, $message, $filename, $line, $context);
}
@owenbush
Copy link

owenbush commented Mar 8, 2017

HACKED CORE!!! HORRIBLE!!!!!! UNSUBSCRIBE.

@bdlangton
Copy link
Author

It's beautiful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment