ID: 26740 Updated by: [EMAIL PROTECTED] Reported By: leo at myleo dot info -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.0.0b2 (beta2) New Comment:
Bogus code, use $this->domain and not $this->$domain. Previous Comments: ------------------------------------------------------------------------ [2003-12-29 08:43:01] leo at myleo dot info Description: ------------ In the source code, $this->filepath is overwritten unexpectly in the assignment $this->$tempFilepath=$this->$filepath.".tmp"; Reproduce code: --------------- class Zone{ var $path; // The path to store zone files var $filepath; // The zone file with absolute filepath var $tempFilepath; // Temporary file var $domain; // Domain object function Zone($domainTemp,$pathTemp){ if(preg_match("/^\//",$pathTemp)){ $this->$path=$pathTemp; $this->$domain=new Domain($domainTemp."."); $this->$filepath=$pathTemp."/".$domainTemp.".zone"; print $this->$filepath; $this->$tempFilepath=$this->$filepath.".tmp"; print $this->$filepath; ... ... Expected result: ---------------- I create the object $zone=new Zone("mydomain.com","/var/named"); $this->$filepath should be /var/named.mydomain.com.zone $this->$tempFilepath should be /var/named.mydomain.com.zone.tmp Actual result: -------------- both variable metioned above have the same value /var/named.mydomain.com.zone.tmp ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26740&edit=1