Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341864 - Expression evaluated wrong during debug
Summary: Expression evaluated wrong during debug
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 01:56 EDT by Sylvia Tancheva CLA
Modified: 2020-05-14 10:17 EDT (History)
0 users

See Also:


Attachments
screen-shot (15.42 KB, image/png)
2011-04-05 01:57 EDT, Sylvia Tancheva CLA
no flags Details
patch (2.39 KB, patch)
2011-05-21 01:29 EDT, Toshihiro Izumi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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