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

Blade exception for text #45424

Closed
mxts opened this issue Dec 25, 2022 · 5 comments
Closed

Blade exception for text #45424

mxts opened this issue Dec 25, 2022 · 5 comments

Comments

@mxts
Copy link

mxts commented Dec 25, 2022

  • Laravel Version: 9.1.4
  • PHP Version: 8.1.13
  • MySQL version: 8.0.31-0ubuntu0.22.04.1
  • MySQL Client version: mysqlnd 8.1.13

Description:

@include('subview', [
    'test' => '(',
])

// subview.blade.php
{{ $test }}

Blade above produces the error ParseError syntax error, unexpected token ",", the cause being the unclosed ( inside the text.

While I understand this is an edge case, the exception does not point directly to the problem and the solution can be quite hard to spot. In my case, the offending text was a frowning face :(

Steps To Reproduce:

I do have a repository, but this should be quite straightforward to reproduce. Thank you.

@github-actions
Copy link

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@bert-w
Copy link
Contributor

bert-w commented Dec 27, 2022

#18317

@mxts
Copy link
Author

mxts commented Dec 27, 2022

Thanks, perhaps it helps to hint about limitations in the subview documentation? I could file a PR for that.

imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 2, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 2, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 2, 2023
@driesvints
Copy link
Member

Looks like we won't be fixing this. Feel free to attempt to PR the docs 👍

imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 3, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 3, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 3, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 3, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 3, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 3, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
imanghafoori1 added a commit to imanghafoori1/laravel_framework that referenced this issue Jan 4, 2023
taylorotwell added a commit that referenced this issue Jan 10, 2023
* Fixes #45424 blade issue with ")" character

* Fixes #45424 blade issue with "(" character

* formatting

* Add test for unclosed blade tag calls

Co-authored-by: Taylor Otwell <[email protected]>
@imanghafoori1
Copy link
Contributor

This can be considered to be fixed as of version 9.47.0 or above.
@mxts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants