www.webdeveloper.com
Results 1 to 4 of 4

Thread: Error Reporting Issues...

  1. #1
    Join Date
    Feb 2008
    Posts
    70

    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
    PHP Code:
    Fatal errorCannot use object of type [object name] as array 
    When setting the error_reporting to E_ALL, then the message appears fine and execution is halted.
    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?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,152
    Any difference if you use &~ instead of ^ ?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Feb 2008
    Posts
    70
    Unfortunately no

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,152
    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.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles