Alexander Schreiner created NETBEANS-2283:
---------------------------------------------
Summary: Netbeans formats content in php strings
Key: NETBEANS-2283
URL: https://issues.apache.org/jira/browse/NETBEANS-2283
Project: NetBeans
Issue Type: Bug
Components: php - Editor
Affects Versions: 10.0
Environment: Product Version: Apache NetBeans IDE 10.0 (Build
20190122-unknown-revn)
Java: 1.8.0_151; Java HotSpot(TM) 64-Bit Server VM 25.151-b12
Runtime: Java(TM) SE Runtime Environment 1.8.0_151-b12
System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
User directory:C:\Users\AlexanderSchreiner\AppData\Roaming\NetBeans\10.0
Cache directory:
C:\Users\AlexanderSchreiner\AppData\Local\NetBeans\Cache\10.0
Reporter: Alexander Schreiner
Attachments: settings.zip
NetBeans formats PHP string literal content. This can lead to bugs when using
PHP functions like header
([https://secure.php.net/manual/de/function.header.php)].
Before:
{code:java}
header('Location: /some/dir?parameter=value');
{code}
After:
{code:java}
header('Location: /some/dir?parameter = value');
{code}
Expected:
{code:java}
header('Location: /some/dir?parameter=value');{code}
Since spaces in URLs are encoded with %20, this will return an invalid URL and
therefore a 404 Error!
Repro:
I somehow can't reproduce the bug on a regular basis. But it occurs in the
worst times, like I mentioned above, when I try to use PHP functions like
header().
I feel like it has a correlation with other formatting. When the file is
already correctly formatted, i can't reproduce the bug. But in big files, let's
say 150 to 300 lines, it occurs more often.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists