-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.3] Fix foreach blade compiler #15485
Conversation
To fix tests, I bring |
Yeah Can you please write a test to make sure your change solves the issue and that it won't get broken after any later changes? |
Yes, please write a test or two. |
added |
@@ -624,7 +624,7 @@ protected function compileForelse($expression) | |||
{ | |||
$empty = '$__empty_'.++$this->forelseCounter; | |||
|
|||
preg_match('/\( *(.*) +as *([^\)]*)/', $expression, $matches); | |||
preg_match('/\( *(.*) +as *([^\)]*)/s', $expression, $matches); |
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.
Can you please add the i
here as well?
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.
Sure.
New line in
@foreach
and@forelse
should be allowed:And this feature is also supported before 5.3
I removed amiss
i
regex modifier and addeds
modifier.