Bug #51363 [Opn->Asn]: Fatal error raised by var_export() not caught by error handler

From: Date: Tue, 23 Mar 2010 13:16:42 +0000
Subject: Bug #51363 [Opn->Asn]: Fatal error raised by var_export() not caught by error handler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148891@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51363&edit=1

 ID:               51363
 Updated by:       derick@php.net
 Reported by:      daan at react dot com
 Summary:          Fatal error raised by var_export() not caught by error
                   handler
-Status:           Open
+Status:           Assigned
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: Debian Etch
 PHP Version:      5.2.13
-Assigned To:      
+Assigned To:      derick



Previous Comments:
------------------------------------------------------------------------
[2010-03-23 12:58:59] daan at react dot com

Description:
------------
When a fatal error is raised by var_export() when trying to export a
resursive array, it is not caught by a user php error handler.

Test script:
---------------
function myErrorHandler($errno, $errstr, $errfile, $errline)
{
    var_dump($errno, $errstr, $errfile, $errline);
    
    /* Don't execute PHP internal error handler */
    return true;
}

set_error_handler("myErrorHandler");

$recursive = array();
$recursive[] = &$recursive; 

var_export($recursive);


Expected result:
----------------
The var_dumped variables

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=51363&edit=1


Thread (8 messages)

« previous php.bugs (#148891) next »