Skip to content

Conversation

phil-nelson
Copy link
Contributor

This fixes a crash when a foreach key is not a straight up variable (which I hadn't realised was possible), e.g. this is valid:

<?php

$arr = [1,2,3];
$a = new stdClass();
foreach ($arr as $a->key => $value) {
    echo "{$a->key}: $value\n";
}

Fixes #563

@codecov
Copy link

codecov bot commented Dec 25, 2017

Codecov Report

Merging #564 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #564      +/-   ##
============================================
+ Coverage     81.46%   81.52%   +0.05%     
  Complexity      901      901              
============================================
  Files            61       61              
  Lines          2061     2062       +1     
============================================
+ Hits           1679     1681       +2     
+ Misses          382      381       -1
Impacted Files Coverage Δ Complexity Δ
src/DefinitionResolver.php 87.03% <100%> (+0.02%) 321 <0> (ø) ⬇️
src/Cache/FileSystemCache.php 25% <0%> (+5%) 8% <0%> (ø) ⬇️

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.

Call to undefined method MemberAccessExpression::getName()
2 participants