[Sage 10] (Whoops) Skip E_USER_NOTICE and E_USER_WARNING

Currently Whoops (or the underlying error handler in Sage 10) handles PHP notices and warnings as ErrorException . How can I turn this off, so some plugins for example don’t prevent local development as the page doesn’t load normally?

Setting Config::define('WP_DEBUG', false); in config/environments/development.php disabled it.

But I get another ErrorException (E_NOTICE) now, so this only skips some of the PHP notices.

If your scripts are throwing exceptions then afaik you have to catch them or they’ll stop execution–I don’t believe there’s a setting to disable that. You can set a global exception handler or see if something is turning errors into ErrorExceptions but generally I feel like if something is throwing exceptions you need to modify your code so it stops throwing exceptions, not teach your environment to ignore them.


This topic was automatically closed after 42 days. New replies are no longer allowed.