Bug #1480: assigning null columns to an array doesnt seem to work

From: Date: Tue, 01 Jun 1999 05:27:56 +0000
Subject: Bug #1480: assigning null columns to an array doesnt seem to work
Groups: php.dev 
Request: Send a blank email to php-dev+get-6347@lists.php.net to get a copy of this message
From: svd@excitecorp.com Operating system: linux PHP version: 3.0.8 PHP Bug Type: Oracle related Bug description: assigning null columns to an array doesnt seem to work this code has some unexpected behavior: while (OCIFetchInto($stmt,$row,OCI_RETURN_LOBS)){ reset($formq[columns]); while($col=each($formq[columns])){ $retrow[$col[value]]=$row[$col[key]]; } $ret[]=$retrow; } if ocifetchinto returns a null into $col[x], then assigning to retrow["index"] has no effect on retrow (i.e. retrow["index"] is not instantiated... doing an each over retrow will not yeild an index "index") I assume the expected behavior should be to instantiate retrow["index"] with an empty string. here's my workaround: $retrow[$col[value]]=sprintf("%s",$row[$col[key]]); php 3.0.8 is the only non-standard module compiled into my apache server 1.3.4

« previous php.dev (#6347) next »