#25547 [NEW]: error_handler and array index with function call

From: Date: Mon, 15 Sep 2003 17:37:55 +0000
Subject: #25547 [NEW]: error_handler and array index with function call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47596@lists.php.net to get a copy of this message
From: cschneid at cschneid dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Scripting Engine problem Bug description: error_handler and array index with function call 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 bug report at http://bugs.php.net/?id=25547&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25547&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25547&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25547&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25547&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25547&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25547&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25547&r=support Expected behavior: http://bugs.php.net/fix.php?id=25547&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25547&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25547&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25547&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25547&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25547&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25547&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25547&r=gnused

« previous php.bugs (#47596) next »