Community
Participate
Working Groups
Build Identifier: I20110613-1736 In mixed PHP/HTML files, the validator will find errors that aren't errors and highlights the wrong parts of the file. For example, in an HTML section, <a onclick="return false;"> will generate an error on "return false;" that you cannot return outside a function or method. This would be a valid error if it were inside a PHP block. Another example: I have a <center> tag that generates an Element is obsolete error, but the <center> tag itself does not get marked for the error. Instead, the <center> tag is on line 31 at character 35 in this particular file, but the yellow squiggly starts on line 38 at character 14, which is in a PHP block. The squiggly continues, without a break, until line 195 character 129, which is inside a PHP block on a commented line. Reproducible: Always Steps to Reproduce: 1. Create a new PHP file 2. Create an empty PHP block <?php ?> 3. Create a link with onclick return false <a onclick="return false;"></a> 4. "return false;" will generate an error 5. Delete the PHP block - the error will disappear 6. Add a PHP block below the link 7. "return false;" will generate an error again - this time the mark starts at the 'l' in false and continues through the '?' in <?php
Created attachment 203442 [details] return from outside a function (twice), start of element is obsolete
Created attachment 203443 [details] end of element is obsolete, full screen of yellow squigglies
Created attachment 203444 [details] result from 'Steps to reproduce'
Created attachment 207347 [details] patch
Can not be reproduced now.
It's been 2y since it cannot be reproduced. Closing the bug