Disabling PHP warnings generated by plugins

I’m currently using Bedrock and Sage (sans Trellis) and seem to be forever coming across PHP warnings that are being generated by plugins, which then breaks certain functionality, even with the environment set to production.

Just really simple things like undefined indexes stops things from working.

If I understand correctly, this is Laravel elements added by Acorn that’s converting these Warnings and throwing Exceptions?

Obviously I can’t fix these problems in the plugins, so is there a way of suppressing them? It seems to be an annoyingly common occurrence.

TIA

Look at this gist.

Look at all the comments by Mike. He resolves some problems regarding Ajax calls…

Hope it will be useful :wink:

1 Like

Sage 10 (acorn library) had some issues with earlier releases with error handling:

PHP warnings and notices caused PHP exceptions.

Currently I am using this code snippet to fix the error handling:

Edit: Had just this issue again with the Widgets page (PHP warnings and notices causing a PHP exception/oops screen).

2 Likes

That’s the badger, fixed a number of my current issues.

Cheers!

1 Like

Thanks, didn’t fix the issue, but i’ve added it nonetheless.