ID:               30798
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mikko dot rantalainen at peda dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Reproducible crash
 Operating System: Mandrake Linux 10.0
 PHP Version:      Irrelevant
 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.

.


Previous Comments:
------------------------------------------------------------------------

[2004-11-15 18:31:29] mikko dot rantalainen at peda dot net

Description:
------------
Attached script crashes PHP 4.3.4 (plus security fixes) which is latest
versions distributed with Mandrake Linux.

Reproduce code:
---------------
<?php function __errorHandler($errno, $errstr, $errfile, $errline,
$errcontext)
{
        error_log("__errorHandler: $errno: $errstr");
        $trace = debug_backtrace();
        foreach ($trace as $data)
        {
                $function = isset($data["function"]) ? $data["function"] : 
"???";
                if ($function == "__errorhandler")
                        continue; # don't print error handler
                $file = isset($data["file"]) ? $data["file"] : "???";
                $line = isset($data["line"]) ? $data["line"] : "??";
                $args = isset($data["args"]) ? serialize($data["args"]) : ""; # 
XXX
                error_log("$file:$line: $function($args)\n");
        }
}
print("<h1>Check log.</h1>");
set_error_handler("__errorHandler");
$parts = split("/",array()); # generate error here
print("EOF.");
?>


Expected result:
----------------
A warning message have been sent to server log and a full page should
have been returned to a client.

Actual result:
--------------
PHP crashes at line marked with "XXX". The problem seems to be related
to the fact that the error is generated with incorrect call to
split().



------------------------------------------------------------------------


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

Reply via email to