PHP 4.0 Bug #7569: Transmuting indices

From: Date: Wed, 01 Nov 2000 16:46:51 +0000
Subject: PHP 4.0 Bug #7569: Transmuting indices
Groups: php.dev 
Request: Send a blank email to php-dev+get-36676@lists.php.net to get a copy of this message
From: ignacio@openservices.net Operating system: Red Hat Linux 6.2 PHP version: 4.0 Latest CVS (01/11/2000) PHP Bug Type: Scripting Engine problem Bug description: Transmuting indices (FYI: actually using 2000.10.27 CVS) Here's a good one. I have an array $kind: """ Array ( [Advertising Space] => Array ( [] => Array ( [0] => 100 [1] => 160 ) ) ... ) """ I pull a record ($row1) from an MS-SQL table (via Sybase-CT): """ Array ( [0] => Advertising Space [KindNm] => Advertising Space [1] => [SubKindNm] => // This is a null string: ""; strlen() gives 0 [2] => [SubSubKindNm] => [3] => 100 [GrantKindID] => 100 ) """ I then do a 'print_r($kind[$row1["KindNm"]][$row1["SubKindNm"]]);': """ <br> <b>Warning</b>: Undefined offset: 0 in <b>/path/to/script/script.php3</b> on line <b>(line with print_r)</b><br> """ I know that it's the second index because 'print_r($kind[$row1["KindNm"]]);' works just fine. So somewhere along the line "" is being changed to 0. -- Edit Bug report at: http://bugs.php.net/?id=7569&edit=1

« previous php.dev (#36676) next »