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

Non existent variable does not throw ErrorException #18

Closed
adakbar opened this issue Nov 14, 2017 · 2 comments
Closed

Non existent variable does not throw ErrorException #18

adakbar opened this issue Nov 14, 2017 · 2 comments
Labels

Comments

@adakbar
Copy link

adakbar commented Nov 14, 2017

Calling a non-existent variable seems not throw any ErrorException.

{{ $non_existent }}

It just silently running without a thing. Interesting enough, that every non-existent variable got default value of null.

@if ($non_existent == null)
    <div>It does exist, but null</div>
@endif

Should it be throw an ErrorException? or is it excpected behaviour?

@duncan3dc
Copy link
Owner

Hi @adakbar, this sounds like your PHP environment is configured to ignore notices.
Can you try increasing the error_reporting level:

# Report all PHP errors
error_reporting(-1);

That should raise an E_NOTICE, if you want it to throw an exception you could use set_error_handler()

@adakbar
Copy link
Author

adakbar commented Nov 14, 2017

Gosh, stupid me. Thanks by the way.

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

No branches or pull requests

2 participants