Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7833427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:42:17+00:00 2026-06-02T12:42:17+00:00

I want to enable deprecated errors globally but disable them for a specific piece

  • 0

I want to enable deprecated errors globally but disable them for a specific piece of third-party code, which I don’t have the time to fix.
So, I have this in php.ini:
error_reporting = E_ALL & ~E_NOTICE | E_DEPRECATED

and this right before the line where I want to disable the warnings
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

However, it does not work, I’m still getting the warnings for that particular line. If I disable them globally in php.ini it works. I’m using PHP 5.3.10. Any ideas what might be wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T12:42:19+00:00Added an answer on June 2, 2026 at 12:42 pm

    Figured it out. The third party code has custom error handler and apparently it’s overriding anything you set with error_reporting(). When I commented out the set_error_handler() line, error_reporting() took effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to disable right click on the webpage but i want enable right
I want to enable auto update script in flex3. i am using below code
I want to enable or disable checkboxes in EXTJS dockedItems: [{ xtype: 'toolbar', dock:
I want to enable or disable the button. Is there any way to drag
I want to enable Access for assistive devices in System Preferences programmatically. But Problem
I want to enable and disable Context Menu, suppose in Context Menu Five Action
I want to enable code coverage for some unit test in my solution. After
I want to enable/disable a text box based on selection of drop down items
I want globally enable whitespace-mode. I have tried this in my .emacs: (require 'whitespace)
I want to enable NSLog when I am in debug and disable it otherwise.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.