Error Reporting Issues...
I am trying to troubleshoot a problem I am having with error reporting.
When I try to access an object as an array the following error message should be displayed by PHP
When setting the error_reporting to E_ALL, then the message appears fine and execution is halted.
Fatal error: Cannot use object of type [object name] as array
Now this displayes a bunch of notices as well that I want to remove so I set the error reporting to E_ALL ^ E_NOTICE, but then the message is not shown at all.
The weird thing is that other parce errors are being shown ok.
Any ideas how to fix this?
Any difference if you use &~ instead of ^ ?
Only thing I can think of is that the not-an-object error is somehow tied to output already sent, such as with session_start(), where the output of those notices before a call to that function would result in a "headers already sent" error/notice. Would that make any sense with the functionality that is failing? You might be able to test it by having all errors on again, but turning on output buffering before anything happens (ob_start()), and see if that makes a difference.
Last edited by NogDog; 10-29-2013 at 10:23 AM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)