Skip to content

Commit

Permalink
change: add class name to core_functions get_backtrace_sequence for…
Browse files Browse the repository at this point in the history
… easy debug
  • Loading branch information
Paco committed Sep 26, 2024
1 parent 5929817 commit 48ac83f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions shared/core_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2456,9 +2456,19 @@ function get_backtrace_sequence() : array {
$bt = debug_backtrace();
$seq = [];
foreach ([1,2,3,4,5,6,7,8] as $key) {
if (isset($bt[$key]['function'])) {
$seq[] = $bt[$key]['function'];

$name_function = $bt[$key]['function'] ?? null;
$name_class = $bt[$key]['class'] ?? null;

$ar_name = [];
if (isset($name_class)) {
$ar_name[] = $name_class;
}
if (isset($name_function)) {
$ar_name[] = $name_function;
}

$seq[] = implode(':', $ar_name);
}

return $seq;
Expand Down

0 comments on commit 48ac83f

Please sign in to comment.