Bug 162771 - [SemanticAnalysis] Detect undefined variables as warnings
Summary: [SemanticAnalysis] Detect undefined variables as warnings
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: Other All
: P3 enhancement with 29 votes (vote)
Target Milestone: ---   Edit
Assignee: Yossi Leon CLA
QA Contact: Yossi Luson CLA
URL:
Whiteboard:
Keywords:
: 152087 177344 206890 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-30 12:33 EST by Douglas E. Warner CLA
Modified: 2020-05-14 13:21 EDT (History)
15 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas E. Warner CLA 2006-10-30 12:33:59 EST
Detecting previously-undefined variables and showing them as warnings would be incredibly helpful in tracking down semi-broken code.
Some logic has to go into this, as things like
if (empty($foo)) {}
should not cause a warning, but something like
foo($bar);
where $bar was previously undeclared, would.
Comment 1 Stanislav Yordanov CLA 2007-05-01 01:46:23 EDT
I think that this behavior should be based on a configuration option which should include the current error_reporting settings like:

Undefined variables report
() report undefined variables
() do not report undefined variables
() obey to PHP error reporting level
Comment 2 Gadi Goldbarg CLA 2007-05-01 06:48:23 EDT
Yossi/Asi is this something we want to implement?
Comment 3 Nick Boldt CLA 2007-07-23 22:47:17 EDT
+1 -- phpeclipse has this feature already in 1.1.9. Adding it as something toggleable via a preferences page would be cool, but having it on by default would be a good first step if time is short.
Comment 4 Guy Gurfinkel CLA 2007-07-30 06:27:27 EDT
*** Bug 152087 has been marked as a duplicate of this bug. ***
Comment 5 Gavin Gilmour CLA 2008-07-19 09:01:55 EDT
Adding to cc.
Comment 6 Michael Spector CLA 2009-06-07 03:31:19 EDT
*** Bug 177344 has been marked as a duplicate of this bug. ***
Comment 7 Michael Spector CLA 2009-06-07 04:45:34 EDT
*** Bug 206890 has been marked as a duplicate of this bug. ***
Comment 8 Michael Spector CLA 2009-06-16 16:15:27 EDT
*** Bug 159393 has been marked as a duplicate of this bug. ***
Comment 9 Zhongwei Zhao CLA 2010-03-08 06:53:04 EST
*** Bug 190676 has been marked as a duplicate of this bug. ***
Comment 10 Glen A. CLA 2017-12-23 04:51:31 EST
Shouldn't this be closed?