php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42407 Function error_get_last returns errors from other scripts
Submitted: 2007-08-24 04:52 UTC Modified: 2007-08-27 16:23 UTC
From: jcharrey at gmail dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 5CVS-2007-08-24 (CVS) OS: Linux
Private report: No CVE-ID: None
 [2007-08-24 04:52 UTC] jcharrey at gmail dot com
Description:
------------
It seems that when error_get_last() is called, if no error has occurred in the calling script the function may often return the last error encountered by the PHP instance. Simply calling this function in an otherwise empty file will spit out random errors from other scripts being run on the same server.

Reproduce code:
---------------
<?php print_r(error_get_last()); ?>

Expected result:
----------------
A blank page.

Actual result:
--------------
Array
(
    [type] => 2048
    [message] => Non-static method modules_html::modoutput_xhtml() should not be called statically
    [file] => /home/swiders2/public_html/grip/includes/frontend.html.php
    [line] => 112
)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-24 10:02 UTC] jani@php.net
And you have reproduced this using the latest 5.2CVS snapshot? 
 [2007-08-27 16:23 UTC] jcharrey at gmail dot com
I'm having trouble reproducing the behavior, so I'm closing this.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 04 16:01:29 2025 UTC