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

 ID:               51362
 Comment by:       neel dot basu dot z at gmail dot com
 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

 New Comment:

Looks like similar to http://bugs.php.net/51533


Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/bug.php?id=51362&edit=1

Reply via email to