Edit report at https://bugs.php.net/bug.php?id=51362&edit=1
ID: 51362
Comment by: dduniec at go2 dot pl
Reported by: daan at react dot com
Summary: var_export() second argument ignored on recursion
fatal error
Status: Assigned
Type: Bug
Package: Output Control
Operating System: Debian Etch
PHP Version: 5.2.13
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
I've just experience that error during debug on production environment. I've
used
it with debug_backtrace() var_export(debug_backtrace(), true) ... it outputs
all
information on the screen before nesting level error.
Previous Comments:
------------------------------------------------------------------------
[2010-04-13 20:37:33] neel dot basu dot z at gmail dot com
Looks like similar to http://bugs.php.net/51533
------------------------------------------------------------------------
[2010-03-23 12:40:11] daan at react dot com
Description:
------------
When calling var_export() on a recursive array, with the 'return' parameter set
to true, a partial var_exported string is echoed and then a fatal error is
raised.
A more correct handling should be to just raise the php fatal error, not output
the partial string. (sensitive data might be accidentally shown, for example)
Test script:
---------------
$recursive = array();
$recursive[] = &$recursive;
$test = var_export($recursive, true);
Expected result:
----------------
Fatal error: Nesting level too deep - recursive dependency? in test.php on line
x
Actual result:
--------------
array ( 0 => array ( 0 => array ( 0 => array ( 0 => array (
Fatal error: Nesting level too deep - recursive dependency? in test.php on line
x
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51362&edit=1