This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 153611

Summary: incorrect warning hint against reference (&) in foreach construct
Product: php Reporter: Ashizawa Kazunori <kasha>
Component: EditorAssignee: rmatous <rmatous>
Status: RESOLVED FIXED    
Severity: blocker CC: g11n
Priority: P3 Keywords: SIMPLEFIX
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Ashizawa Kazunori 2008-11-21 09:26:35 UTC
incorrect warning hint against reference (&) in foreach construct

(Based on user's feedback)

Go Options>Editor>Hints, Language PHP, check "Experimental" and
"Variable might have not been initialized", then OK.

Now editor shows hint warning to the following code.  This code
should be valid.

        $array_variable = array(1, 1);
        foreach ($array_variable as &$variable) {
            ;
        }

This issue can reproduced on NetBeans 6.5 and also on Dev Build
200811200201.
Comment 1 Tomasz Slota 2008-11-24 17:25:57 UTC
Confirmed, should be easy to fix
Comment 3 Quality Engineering 2009-09-24 12:34:19 UTC
Integrated into 'main-golden', will be available in build *200909230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/de3d449cf32d
User: Radek Matous <rmatous@netbeans.org>
Log: #153611 incorrect warning hint against reference (&) in foreach construct