Skip to content

Commit

Permalink
Update AbstractHandler.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane authored Sep 21, 2022
1 parent 8c813ae commit a3e8d8f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/webfiori/error/AbstractHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,22 @@ private function setTrace() {
$this->traceArr = $ex->getDebugTrace();
} else {
$trace = $ex->getTrace();

$currentLine = isset($trace[0]['line']) ? $trace[0]['line'] : 'X';
$currentFile = isset($trace[0]['file']) ? $trace[0]['file'] : 'X';
$nextLine = '';
$nextFile = '';
$idx = 0;
foreach ($trace as $traceEntry) {
$this->traceArr[] = new TraceEntry($traceEntry);
if ($idx != 0) {
$nextFile = isset($traceEntry['file']) ? $traceEntry['file'] : 'X';
$nextLine = isset($traceEntry['line']) ? $traceEntry['line'] : 'X';
$traceEntry['file'] = $currentFile;
$traceEntry['line'] = $currentLine;
$this->traceArr[] = new TraceEntry($traceEntry);
$currentFile = $nextFile;
$currentLine = $nextLine;
}
$idx++;
}
}
}
Expand Down

0 comments on commit a3e8d8f

Please sign in to comment.