0

I know that how to hide/show PHP Notice Error, So my question isn't a duplicate question of How do I turn off PHP Notices? or sinilar questions.

There is a notice error in my project. Unfortunately, I can't fix it because it is coming from required third party plugin and I have no time to totally study that third party plugin.

I can't off all errors since I am still building some parts, But it is frustration seeing above error. So is there any way to hide only that errors from displaying?

1 Answers1

1

Use the error_reporting() function to temporarily disable specific error levels...

$errorLevel = error_reporting(E_ALL & ~E_NOTICE); // disable E_NOTICE errors

useThirdPartyCode();

error_reporting($errorLevel); // restore error level
Phil
  • 157,677
  • 23
  • 242
  • 245