#25547 [Opn->Asn]: error_handler and array index with function call

From: Date: Wed, 24 Sep 2003 02:03:04 +0000
Subject: #25547 [Opn->Asn]: error_handler and array index with function call
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-48019@lists.php.net to get a copy of this message
ID: 25547 Updated by: sniper@php.net Reported By: cschneid at cschneid dot com -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: * -PHP Version: Irrelevant +PHP Version: 4.3.4-dev, 5.0.0b2-dev Assigned To: helly Previous Comments: ------------------------------------------------------------------------ [2003-09-15 13:37:55] cschneid at cschneid dot com Description: ------------ Error handler seems to destroy array indices if called due to a undefined array index generated by a function. Reproduce code: --------------- function handler($errno, $errstr, $errfile, $errline) { $test = "aaa"; } set_error_handler('handler'); $output[trim("bbbbbbb")]++; print_r($output); Expected result: ---------------- Array ( [bbbbbbb] => 1 ) Actual result: -------------- Array ( [aaa] => 1 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25547&edit=1

« previous php.bugs (#48019) next »