Bug #51362 [Asn->Nab]: var_export() second argument ignored on recursion fatal error
| From: | derick@php.net | Date: | Mon, 19 Jan 2015 23:12:09 +0000 |
| Subject: | Bug #51362 [Asn->Nab]: var_export() second argument ignored on recursion fatal error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190065@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51362&edit=1
ID: 51362
Updated by: derick@php.net
Reported by: daan at react dot com
Summary: var_export() second argument ignored on recursion
fatal error
-Status: Assigned
+Status: Not a bug
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:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
I can not reproduce this with PHP 5.2.18 (or PHP 5.3.29 or later).
Previous Comments:
------------------------------------------------------------------------
[2012-01-13 12:03:12] dduniec at go2 dot pl
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.
------------------------------------------------------------------------
[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