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 167860 - combined highlighter HTML/PHP reports bogus-errors
Summary: combined highlighter HTML/PHP reports bogus-errors
Status: RESOLVED DUPLICATE of bug 149968
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 09:25 UTC by marcusson
Modified: 2009-08-19 08:50 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 marcusson 2009-06-30 09:25:31 UTC
The following is a valid PHP/HTML code combination:

<input value="" <?php echo ""; ?>/><p>&nbsp;</p>

NetBeans reports a warning for attribute "value", that reads: "unknown attribute value of tag <p>"

Obviously there is a problem, when a PHP-tag is found inside a HTML tag.
Several similar warnings and errors can be provoked by writing similar constructs. Another example:

<form method="post" action="index.php" <?php echo ''; ?>> </form>

NetBeans reports a warning for "unmatched tag" tag "</form>".

Another example:

<ul>
<li <?php echo ""; ?>>
<a href="">test</a>
</li>
</ul>

NetBeans reports an error for tag "a" (unexpected tag a found, expecting one of li), another warning for "</li>"
(unmatched tag) and another error for "ul" (the content is unresolved, expecting one of li).

Suggestion:
Maybe HTML-errors should be ignored where NetBeans can't predict the output of a script? Otherwise NetBeans will clutter
up all error-reports / task-list with messages, that are obviously nonsense.

Background information:
While users are encouraged not to mix PHP and HTML anyway, PHP template engines like Smarty automatically produce mixed
content pages for output-caching. NetBeans tries to index these cached files and by doing so produces tons of
false-positives.
Comment 1 Tomasz Slota 2009-08-18 16:57:06 UTC
Probably a duplicate of issue 149968, marku please verify
Comment 2 Marek Fukala 2009-08-19 08:50:23 UTC
Yes, you are right it is duplicate of issue #149968

*** This issue has been marked as a duplicate of 149968 ***