-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] notice on potential undefined index #34636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
the question is how it is possible to have these non-existent keys in the output of |
Also if it is possible, we should probably not just fallback to null here, it may have other impacts on this code path. |
src/Symfony/Component/VarDumper/Dumper/ContextProvider/SourceContextProvider.php
Outdated
Show resolved
Hide resolved
it is, PHP inserts virtual frames in a few cases (can't remember exactly which ones) |
I have been trying to reproduce the error today to provide more context but I haven't be able to reproduce it yet. |
Thank you @sylvainmetayer. |
…tayer) This PR was squashed before being merged into the 4.3 branch. Discussion ---------- [VarDumper] notice on potential undefined index Fix the following issue that can happen (Drupal 8 project for context, with the [Twig vardumper](https://www.drupal.org/project/twig_vardumper) module) : ``` Notice: Undefined index: file in Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider->getContext() (line 55 of /var/www/app/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php). ``` | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | None | License | MIT | Doc PR | N/A Commits ------- d4c34e0 [VarDumper] notice on potential undefined index
Fix the following issue that can happen (Drupal 8 project for context, with the Twig vardumper module) :