Scott
Scott

Reputation: 6736

Can't suppress deprecated warnings in php v5.3

I've seemingly tried about every different suggestion provided through a couple hours of Google and stackoverflow searching to no avail, and I cannot seem to suppress a large sum of "Deprecated: Assigning the return value of new by reference is deprecated in " errors presented at the top of my application, as well as Many "Warning: the magic method __get() (and __set()) must have public visibility and cannot be static in . Thus far, I have added the following line and many different variations of it to my php.ini file:

error_reporting = E_ALL & ~E_DEPRECATED
error_reporting = E_ALL ^ E_DEPRECATED

I've also attempted a straight suppression of every single error:

error_reporting = ~E_ALL

To no avail either. I've confirmed that it is correctly reading the php.ini file by adjusting other settings successfully. I've also applied the error_reporting() function (with all different variations of what's provided above) within my scripts with no more luck. Does the location of the reporting have anything to do with the suppression? I've tried posting it at the top of the first file being loaded, also at the top of a required file that is getting called immediately upon executing the main script, no where does it seem to take it.

Upvotes: 3

Views: 7744

Answers (1)

Rudie
Rudie

Reputation: 53881

Try it with a number: http://www.php.net/manual/en/errorfunc.constants.php

Everything but the two deprecateds would be 8191.

PS. It's possible the app/framework/website you're watching/editing/creating sets the error reporting level to E_ALL. If so, it doesn't matter what you set in php.ini, because it's overridden later.

Upvotes: 3

Related Questions