Page 1 of 1

PHP Error Reporting

Posted: Sun Apr 25, 2010 5:30 pm
by JakeJ
I'm having trouble turning error reporting off.

I've set the following in php.ini:
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = off

Also tried ~E_NOTICE but that didn't work either.

Specifically I'm getting deprecated errors:
Deprecated: Assigning the return value of new by reference is deprecated in <path>

The above line of code did not turn it off.

I also tried error_reporting(0); right on the page (actually on both pages involved) and that hasn't worked either.

Bottom line is, I have to get rid of that error! how do I do that? Getting rid of the code that causing the error isn't an option right now.

Re: PHP Error Reporting

Posted: Sun Apr 25, 2010 5:49 pm
by requinix
You know, all you have to do to resolve that error is remove the & from

Code: Select all

$var =& new Object();
Two seconds.

What if you do the error_reporting(0); just before that one line?

Re: PHP Error Reporting

Posted: Sun Apr 25, 2010 8:34 pm
by JakeJ
I removed & and that did trick. I appreciate it!