Skip to content

Commit

Permalink
[VarDumper] notice on potential undefined index
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainmetayer authored and nicolas-grekas committed Nov 28, 2019
1 parent ea49408 commit 8efdf30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dumper/ContextProvider/SourceContextProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public function getContext(): ?array
&& 'dump' === $trace[$i]['function']
&& VarDumper::class === $trace[$i]['class']
) {
$file = $trace[$i]['file'];
$line = $trace[$i]['line'];
$file = $trace[$i]['file'] ?? $file;
$line = $trace[$i]['line'] ?? $line;

while (++$i < $this->limit) {
if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && 0 !== strpos($trace[$i]['function'], 'call_user_func')) {
Expand Down

0 comments on commit 8efdf30

Please sign in to comment.