#45236 [Opn]: error_get_last reports errors from other scripts
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)