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?

3
  • 1
    Nope, instead let the libs maintainers know by opening an issue. Commented Nov 9, 2018 at 5:18
  • 1
    try-catch to the rescue if you know where to find it Commented Nov 9, 2018 at 5:19
  • 2
    @comphonia an E_NOTICE level error isn't going to throw an exception Commented Nov 9, 2018 at 5:23

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.