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 126144 - PHP editor reports errors on correct PHP code
Summary: PHP editor reports errors on correct PHP code
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks: 126072
  Show dependency tree
 
Reported: 2008-01-28 19:26 UTC by Jan Chalupa
Modified: 2008-01-30 21:02 UTC (History)
3 users (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 Jan Chalupa 2008-01-28 19:26:05 UTC
[NB 6.1 build #20080125; JDK 6u3]

I have a project with WordPress 2.3.2 sources. The editor reports an error on line 267 of the wp-settings.php file. The
offending code fragment looks like this:

    $wp_the_query =& new WP_Query();

The editor reports an unexpected token '&'. However it seems to have something to do with the occurrence of the 'new'
operator later in the expression as the parser doesn't seem to have any issues with the following statement:

    $wp_query =& $wp_the_query;

No errors are reported for this line.
Comment 1 Alexei Mokeev 2008-01-29 07:08:31 UTC
This for fixed for M1. Well reproducible with NB 6.0
Not reproducible in 6.1 M1 200801280931 build.
Please verify.
Comment 2 Jan Chalupa 2008-01-29 11:59:16 UTC
Reopening. I can still reproduce the issue in the latest trunk build (#200801290002). I could not reproduce it in 6.1 M1
that was branched more than a week ago. I don't have an explanation, but it needs more investigation.
Comment 3 Alexei Mokeev 2008-01-29 15:39:43 UTC
Den, Petr, were there any M1 specific chanages in .nbs ?
That's strange, but might be something related to http://www.netbeans.org/issues/show_bug.cgi?id=124707

If there were no M1 specific changes in .nbs then we should look into Schliemann changes. 
Comment 4 Petr Pisl 2008-01-29 16:21:24 UTC
One of the fix for issue #124707 was & removed from one grammar rule. The problem is described in issue #124707. The
reason why it worked before, is that after nb 6.0, there was introduce new nbs reader, which checks possible problems in
the grammatic.
Comment 5 Denis Anisimov 2008-01-30 13:40:26 UTC
It seems it is fixed .
I cannot reproduce this issue with binaries that ware built from HG.
This is most fresh version .
So I believe we can close it.

Indeed there was a problem in .nbs file with leading "&" for "new" statement.
It was fixed by Dan Prusa some time ago.

When you will verify this issue please clean your home directory NB cache for sure.
Possibly it could be the reason of such behavior.
Comment 6 Jan Jancura 2008-01-30 13:54:02 UTC
works for me on:
  Product Version         = NetBeans IDE Dev (Build 080129)
  Operating System        = Linux version 2.6.22-14-generic running on i386
  Java; VM; Vendor        = 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04; Sun Microsystems Inc.
Comment 7 Jan Chalupa 2008-01-30 21:02:26 UTC
I can't reproduce it either anymore. Verified.