php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28254 Problems with set_error_handler() and E_STRICT notices
Submitted: 2004-05-02 19:12 UTC Modified: 2004-05-02 20:43 UTC
From: Enrico dot Simetti at ingegneria dot studenti dot unige Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.0.0RC1 OS: Redhat 7.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Enrico dot Simetti at ingegneria dot studenti dot unige
New email:
PHP Version: OS:

 

 [2004-05-02 19:12 UTC] Enrico dot Simetti at ingegneria dot studenti dot unige
Description:
------------
the set_error_handler() seems to not working correctly with E_STRICT notices.

relevant changes to php.ini:
error_reporting  =  E_ALL | E_STRICT
display_errors = On
display_startup_errors = On

Reproduce code:
---------------
class sfc_error {
  function __construct() {
    set_error_handler(array(&$this, 'handler'), E_ALL | E_STRICT);
  }

  function handler($errno, $errstr, $errfile, $errline, $errctx) {
    //log the error
  }
}

Expected result:
----------------
My class should intercept every error and log them.

Actual result:
--------------
All the errors are intercepted, except the E_STRICT ones, which are displayed (sent to the HTML output) as if my handle routine was bypassed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-02 19:45 UTC] Enrico dot Simetti at ingegneria dot studenti dot unige
seems like it was just my fault ;)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Feb 09 06:00:01 2026 UTC