From: bibifoc23 at yahoo dot fr Operating system: all PHP version: 4.3.2 PHP Bug Type: Arrays related Bug description: incorrect value for texte in array
Description: ------------ hello, I get strange behaviour with array: <?php $array = array ( 'TM' => 'test', 'autre dossier' => 'texte' ) ; print_r ( $array ); echo $array['TM']['TM']."\n"; ?> the echo command return the first character of string. But $array['TM'] is not an array, so i expext to have an error wen i call $array['TM']['TM']. But PHP convert the second index to 0. Thanks Reproduce code: --------------- <?php $array = array ( 'TM' => 'test', 'autre dossier' => 'texte' ) ; print_r ( $array ); echo $array['TM']['TM']."\n"; ?> Expected result: ---------------- return error or warning. Actual result: -------------- return the first character of the string -- Edit bug report at http://bugs.php.net/?id=24494&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24494&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24494&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24494&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24494&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24494&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24494&r=support Expected behavior: http://bugs.php.net/fix.php?id=24494&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24494&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24494&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24494&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24494&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24494&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24494&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24494&r=gnused