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 126140 - PHP editor reports error on valid PHP source (ternary operator)
Summary: PHP editor reports error on valid PHP source (ternary operator)
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:05 UTC by Jan Chalupa
Modified: 2008-02-03 21:58 UTC (History)
0 users

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:05:25 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 130 of the wp-mail.php file. The
offending code fragment is:

   $content[1] ? $content = $content[1] : $content = $content[0];

The editor reports an error on the first assignment operator. It seems that the parser doesn't honor the priority of
operators properly. The assignment operator should be of higher priority than the ternary operator ( ? : ).
Comment 1 Alexei Mokeev 2008-01-29 06:50:58 UTC
Reproduced on 6.1 M1 200801280931
Comment 2 Denis Anisimov 2008-01-30 13:24:38 UTC
Yes, I think problem is in operation priority.
Need to fix .nbs file.
Comment 3 Denis Anisimov 2008-02-01 13:07:32 UTC
It was fixed by Jan Jancura.
Comment 4 Jan Chalupa 2008-02-03 21:58:42 UTC
Verified in build #20080203. Thanks.