Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[ExpressionLanguage] throw an SyntaxError instead of an undefined index notice#25323
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[ExpressionLanguage] throw an SyntaxError instead of an undefined index notice#25323
Uh oh!
There was an error while loading.Please reload this page.
Conversation
99b4086 to8822114Compare
sroze left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good 👍
| ++$this->position; | ||
| if (!isset($this->tokens[$this->position])) { | ||
| thrownewSyntaxError('Unexpected end of expression',$this->current->cursor,$this->expression); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shouldn't we move the safe guard that was already there? I don't see how the first exception could ever be thrown. It looks to me like this was just mistakenly placed before the pointer is advanced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
done
8822114 to78abc89Comparefabpot commentedDec 7, 2017
Thank you@Simperfit. |
…defined index notice (Simperfit)This PR was merged into the 2.7 branch.Discussion----------[ExpressionLanguage] throw an SyntaxError instead of an undefined index notice| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->| Tests pass? | yes| Fixed tickets |#25214| License | MIT| Doc PR | noneI think this is a bug when the components throws a notice instead of an exception.it's too early and too dark to see something outside so here is my couch :Commits-------78abc89 [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
I think this is a bug when the components throws a notice instead of an exception.
it's too early and too dark to see something outside so here is my couch :
