#45236 [Opn]: error_get_last reports errors from other scripts

From: Date: Wed, 11 Jun 2008 13:23:42 +0000
Subject: #45236 [Opn]: error_get_last reports errors from other scripts
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125682@lists.php.net to get a copy of this message
 ID:               45236
 User updated by:  jdp34 at njit dot edu
 Reported By:      jdp34 at njit dot edu
 Status:           Open
 Bug Type:         *General Issues
 Operating System: Linux
 PHP Version:      5.2.6
 New Comment:

This happens only on my Linux installation, but not on my Windows
installation.


Previous Comments:
------------------------------------------------------------------------

[2008-06-11 13:20:06] jdp34 at njit dot edu

Description:
------------
error_get_last() returns errors from other scripts running on the same
PHP instance, or reports errors previously in the script that had since
been fixed. If run as the sole contents of a file, it will return the
errors that PHP picked up before in previous scripts.

Reproduce code:
---------------
<?php
// the only contents of the file
print_r(error_get_last())
?>

Expected result:
----------------
Nothing.

Actual result:
--------------
Array ( [type] => 8 [message] => Undefined variable: foo [file] =>
/home/jdp/public_html/not_the_same_script.php [line] => 5 )


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45236&edit=1



Thread (3 messages)

« previous php.bugs (#125682) next »