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 - incorrect warning hint against reference (&) in foreach construct
Summary: incorrect warning hint against reference (&) in foreach construct
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: rmatous
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2008-11-21 09:26 UTC by Ashizawa Kazunori
Modified: 2009-09-24 12:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

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