Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341864

Summary: Expression evaluated wrong during debug
Product: z_Archived Reporter: Sylvia Tancheva <silviya>
Component: PDTAssignee: PHP Debug <php.debug-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
screen-shot
none
patch none

Description Sylvia Tancheva CLA 2011-04-05 01:56:07 EDT
When debugging the following code, and hovering on top of the word "$_logFile" the evaluated expression is wrong. See this code:

<?php
class A {    
    public function testUpdateEmployee ()
    {
            if ($zendLogDir) {
                        $logPath = $zendLogDir . "/deployment_lib.log" ;      
                        self::$_logFile = fopen($logPath, "a+");
                        ini_set("error_log", $logPath);     
                  }      
        
        
    }
    
}

Look at the attached screen-shot
Comment 1 Sylvia Tancheva CLA 2011-04-05 01:57:02 EDT
Created attachment 192521 [details]
screen-shot
Comment 2 Toshihiro Izumi CLA 2011-05-21 01:29:52 EDT
Created attachment 196264 [details]
patch
Comment 3 Zhongwei Zhao CLA 2011-05-23 02:24:46 EDT
applied the patch,thanks!
Comment 4 Sylvia Tancheva CLA 2011-07-13 08:59:56 EDT
I used this code for verifying. I started debugging and set BP before and after the self::$_logFile = fopen ( $logPath, "a+" ); line and checked the state of the $_logFile.

<?php
class A {
	public static $_logFile;
	
	public function testUpdateEmployee() {
		if (1) {
			$logPath = "C:\zendLogDir\deployment_lib.log";
			self::$_logFile = fopen ( $logPath, "a+" );
			ini_set ( "error_log", $logPath );
		}
	}
}
$a = new A ();
$a->testUpdateEmployee ();

Correct hover words. Seems OK. Closing.
Comment 5 Sylvia Tancheva CLA 2011-07-13 09:00:27 EDT
I used this code for verifying. I started debugging and set BP before and after the self::$_logFile = fopen ( $logPath, "a+" ); line and checked the state of the $_logFile.

<?php
class A {
	public static $_logFile;
	
	public function testUpdateEmployee() {
		if (1) {
			$logPath = "C:\zendLogDir\deployment_lib.log";
			self::$_logFile = fopen ( $logPath, "a+" );
			ini_set ( "error_log", $logPath );
		}
	}
}
$a = new A ();
$a->testUpdateEmployee ();

Correct hover words. Seems OK. Closing.

Ilina Stefanova