Bug #1109: Argument passed by value behaves as if passed by reference!

From: Date: Mon, 01 Feb 1999 22:18:40 +0000
Subject: Bug #1109: Argument passed by value behaves as if passed by reference!
Groups: php.dev 
Request: Send a blank email to php-dev+get-3828@lists.php.net to get a copy of this message
From: jason@wildrhino.com Operating system: freebsd 2.2.7 PHP version: 3.0.6 PHP Bug Type: Other Bug description: Argument passed by value behaves as if passed by reference! class series { var $ID=0; var $objectArray=array(); //'ID'->position function initFromDB($ID) { if (!$ID) { die("<DIV CLASS='error'>ID is not set in series->initFromDB</DIV>"); } $this->ID=$ID; $query="SELECT objectID,position FROM objectSeriesXRef WHERE seriesID=$ID ORDER BY position"; if (!$result=mysql_query($query)) { die("<DIV CLASS='error'>" . __FILE__ . ": Line " . __LINE__ . "<BR>$query<BR>" . mysql_error() . "</DIV>"); } while ( list($ID,$position)=mysql_fetch_row($result) ) { $this->objectArray[$ID]=$position; } } }; $series=new series; echo "<BR>sID2: $seriesID"; $series->initFromDB($seriesID); echo "<BR>sID3: $seriesID"; /* if $ID in series->initFromDB is NOT modified, no problem occurs */ -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3828) next »