Skip to content

Conversation

@mejta
Copy link
Contributor

@mejta mejta commented Aug 21, 2018

Submit a feature request or bug report


What is the current behaviour?

Compiled comments template is included directly and that causes the error with missing $__env variable and that causes that e.g. @foreach cycle doesn't work.

What is the expected or desired behavior?

Comments template is rendered with Blade's render method.


Bug report

Please provide steps to reproduce, including full log output:

  1. add the following code to partials/comments.blade.php
@foreach([1,2,3,4,5] as $i)
  {{ $i }}
@endforeach
  1. an error occures

Please describe your local environment:

WordPress version: 4.9

Where did the bug happen? Development or remote servers?

Everywhere

Is there a related Discourse thread or were any utilized (please link them)?

https://discourse.roots.io/t/why-cant-i-foreach-my-var/12021/3

@mmirus
Copy link
Contributor

mmirus commented Aug 21, 2018

Have confirmed both the bug and that this PR fixes it. Would like review from someone else before merging.

@mmirus mmirus requested a review from QWp6t August 21, 2018 17:21
@retlehs retlehs merged commit 0d4b251 into roots:master Aug 21, 2018
@retlehs
Copy link
Member

retlehs commented Aug 21, 2018

thanks y'all!

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.

3 participants