Created
April 30, 2013 16:19
-
-
Save tsmith512/5489802 to your computer and use it in GitHub Desktop.
Quick-n-dirty patch to Drupal 7 bootstrap to examine backtraces on error messages. Requires devel enabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc | |
index fe3d7a7..c2c95cc 100644 | |
--- a/includes/bootstrap.inc | |
+++ b/includes/bootstrap.inc | |
@@ -1794,6 +1794,11 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO | |
*/ | |
function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) { | |
if ($message) { | |
+ | |
+ if ($type == 'error') { | |
+ $message = kprint_r( debug_backtrace(), TRUE, $message ); | |
+ } | |
+ | |
if (!isset($_SESSION['messages'][$type])) { | |
$_SESSION['messages'][$type] = array(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment