The @ Error Control Operator is no longer suppressing errors in Blade templates #44116
Unanswered
warmwhisky
asked this question in
Q&A
Replies: 1 comment 14 replies
-
Can you share the error? Just tested on a fresh install just changing the <input type="hidden" name="user_id" value="{{ @$user->id }}"> and no error was thrown and the output is as expected (an As I didn't pass any variables to the view, it should error by no Also, as a tip, since PHP 8 you can do this instead: <input type="hidden" name="user_id" value="{{ $user?->id }}"> which, in my opinion, is clearer. |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
The @ Error Control Operator is no longer suppressing errors in Blade templates
Steps To Reproduce:
Use the @ sign before a variable.
<input type="hidden" name="user_id" value="{{ @$user->id }}">
I could change it to
{{ isset($user) ? $user->id : '' }}
but wondered if something had changed or been deprecated?Beta Was this translation helpful? Give feedback.
All reactions