bug #14271 [VarDumper] Fix call site detection (nicolas-grekas)
This PR was merged into the 2.6 branch.
Discussion
----------
[VarDumper] Fix call site detection
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`$trace[$i]['file']` is not always defined and `call_user_func_array` should also be filtered out.
Commits
-------
d8fb6a4
[VarDumper] Fix call site detection
This commit is contained in:
commit
aeef0cd9a2
@ -84,7 +84,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
|||||||
$line = $trace[$i]['line'];
|
$line = $trace[$i]['line'];
|
||||||
|
|
||||||
while (++$i < 7) {
|
while (++$i < 7) {
|
||||||
if (isset($trace[$i]['function']) && empty($trace[$i]['class']) && 'call_user_func' !== $trace[$i]['function']) {
|
if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && 0 !== strpos($trace[$i]['function'], 'call_user_func')) {
|
||||||
$file = $trace[$i]['file'];
|
$file = $trace[$i]['file'];
|
||||||
$line = $trace[$i]['line'];
|
$line = $trace[$i]['line'];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user