|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-11-15 18:40 UTC] derick@php.net
[2005-01-28 10:52 UTC] mikko dot rantalainen at peda dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
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().