summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalvis2010-12-07 21:45:14 (GMT)
committer salvis2010-12-07 21:45:14 (GMT)
commitc073db1a19466932ae611d701c79d591947396c6 (patch)
treefb45b897907bc8935b0e342ceb9b97131661b8b2
parenta581ba4f11caa18d5267a23a1b1d0f1dffe16be9 (diff)
#919258 by donquixote: Fix ddebug_backtrace() fails if a function is repeated (recursion).
-rw-r--r--devel.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/devel.module b/devel.module
index 2460279..98a3c3b 100644
--- a/devel.module
+++ b/devel.module
@@ -1640,8 +1640,10 @@ function ddebug_backtrace() {
if (user_access('access devel information')) {
$trace = debug_backtrace();
array_shift($trace);
- foreach ($trace as $key => $value) {
- $rich_trace[$value['function']] = $value;
+ $count = count($trace);
+ foreach ($trace as $i => $call) {
+ $key = ($count - $i) . ': ' . $call['function'];
+ $rich_trace[$key] = $call;
}
if (has_krumo()) {
print krumo($rich_trace);