Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz committed Jun 30, 2024
1 parent 9c41d1f commit 8c168cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Renderer/HtmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,13 @@ public function renderCallStack(Throwable $t, array $trace = []): string
$class = !empty($trace[$i]['class']) ? $trace[$i]['class'] : null;
$args = !empty($trace[$i]['args']) ? $trace[$i]['args'] : [];

$parameters = [];
$function = null;
if (!empty($trace[$i]['function']) && $trace[$i]['function'] !== 'unknown') {
$function = $trace[$i]['function'];
$reflection = new \ReflectionMethod($class, $function);
$parameters = $reflection->getParameters();
if ($class !== null) {
$parameters = (new \ReflectionMethod($class, $function))->getParameters();
}
}
$index = $i + 2;

Expand Down
1 change: 1 addition & 0 deletions tests/Renderer/HtmlRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public function testRenderCallStackItemIfFileIsNotExistAndLineMoreZero(): void
'args' => [],
'index' => 1,
'isVendorFile' => false,
'reflectionParameters' => [],
]));
}

Expand Down

0 comments on commit 8c168cc

Please sign in to comment.