framework icon indicating copy to clipboard operation
framework copied to clipboard

forgetting to close @if with ) in blade view cause laravel to crash with no output

Open elfif opened this issue 12 years ago • 3 comments

Not much else to say. i made a few changes on a view, and when i tried to test it laravel crached completely, returning nothing.

It was just something like

@if ((condition1) && (condition2) @include (something) @endif

I ended up finding my mistake quite fast but i was still surprised that the blade compiler didn't handle it a better way.

elfif avatar Feb 03 '14 22:02 elfif

Well, Blade compiles to PHP, if your PHP has a syntax error, I don't quite see how Laravel could improve that.

Anahkiasen avatar Feb 03 '14 23:02 Anahkiasen

I agree with you on that point. My fault for the syntax error. What i wanted to say, the fact that Laravel doesn't output anything, not even a syntax error message is not the best behavior in my opinion

On Tue, Feb 4, 2014 at 12:08 AM, Maxime Fabre [email protected]:

Well, Blade compiles to PHP, if your PHP has a syntax error, I don't quite see how Laravel could improve that.

Reply to this email directly or view it on GitHubhttps://github.com/laravel/framework/issues/3450#issuecomment-34011975 .

elfif avatar Feb 04 '14 15:02 elfif

I would check your PHP error notification settings.

taylorotwell avatar Feb 27 '14 20:02 taylorotwell