Skip to content

Commit

Permalink
Additional backtrace conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbj committed Feb 27, 2024
1 parent bf9d0b2 commit 9685027
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions TracyDebugger.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getModuleInfo() {
'summary' => __('Tracy debugger from Nette with many PW specific custom tools.', __FILE__),
'author' => 'Adrian Jones',
'href' => 'https://processwire.com/talk/forum/58-tracy-debugger/',
'version' => '4.25.20',
'version' => '4.25.21',
'autoload' => 100000, // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
'singular' => true,
'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',
Expand Down Expand Up @@ -1352,9 +1352,11 @@ function bsZIndex() {


// populate redirect info for Request Info panel
$this->wire()->addHookBefore('Session::redirect', function($event) {
static::$redirectInfo = Debug::backtrace()[0];
});
if(method_exists('\ProcessWire\Debug', 'backtrace')) {
$this->wire()->addHookBefore('Session::redirect', function($event) {
static::$redirectInfo = Debug::backtrace()[0];
});
}


// MAIL INTERCEPTOR
Expand Down

0 comments on commit 9685027

Please sign in to comment.