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

[5.4] Blade's @parent won't work if @section name is defined between double quotes #17670

Closed
dvlpp opened this issue Jan 30, 2017 · 1 comment

Comments

@dvlpp
Copy link

dvlpp commented Jan 30, 2017

  • Laravel Version: 5.4.6
  • PHP Version: 7.0
  • Database Driver & Version: N/A

Description:

Oddly, the @parent Blade directive won't work (meaning parent placeholder remains) if the @section directive is defined with double quotes.

So this code works:

@section('header')
    @parent
    header
@endsection

And this one don't:

@section("header")
    @parent
    header
@endsection

Seems that the quotes make a difference in the ManagesLayouts::$parentPlaceholder array.

Steps To Reproduce:

Just create a layout with some @section and let it be extended by a view, and try to put single and double quotes around its name.

@themsaid
Copy link
Member

Thank you, PR submitted with a fix #17677

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

No branches or pull requests

2 participants