Skip to content
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

Fix crash on unknown foreach type #562

Merged
merged 2 commits into from
Dec 24, 2017

Conversation

phil-nelson
Copy link
Contributor

This fixes a crash when a node in a foreach expression cannot be resolved to a type.

Fixes #561

Copy link
Owner

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix and test!

@codecov
Copy link

codecov bot commented Dec 24, 2017

Codecov Report

Merging #562 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #562      +/-   ##
============================================
- Coverage     81.55%   81.46%   -0.09%     
  Complexity      901      901              
============================================
  Files            61       61              
  Lines          2060     2061       +1     
============================================
- Hits           1680     1679       -1     
- Misses          380      382       +2
Impacted Files Coverage Δ Complexity Δ
src/DefinitionResolver.php 87.01% <100%> (+0.2%) 321 <0> (ø) ⬇️
src/Cache/FileSystemCache.php 20% <0%> (-5%) 8% <0%> (ø)
src/Indexer.php 58.22% <0%> (-2.54%) 18% <0%> (ø)

@felixfbecker felixfbecker merged commit 425b239 into felixfbecker:master Dec 24, 2017
@felixfbecker
Copy link
Owner

felixfbecker commented Dec 24, 2017

Coverage went down because https://xdebug.org is down right now so Windows didn't have XDebug to generate coverage

cgxxv pushed a commit to cgxxv/php-language-server that referenced this pull request Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing foreach() causes exception
2 participants