-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP code template insertion fails and empties the line #7170
Comments
Please check the messages log file - it seems to be a binary file rather than text?? |
The file is text but in fact the first line had NULL characters, I removed them |
@EtienneDelepine
<?php
for // CC & select for template here |
It's strange because it is not happening in all files. |
It would be nice if you could find and provide an example to reproduce it. |
It also happens to me. I have my own custom "Code template" with the following code:
and with the shortcut "getset". After some work in the normal PHP file, I wrote "getset" + tab, which normally generates the proper code. Sometimes in the same file and after some work, it makes this exception. Sometimes helps to delete all cache files and restart Netbeans and sometimes not :( It starts with this exception about 2 versions before. |
Another way that lead into the same exception is #4621 (comment) But there was a problem with not-valid template. |
This is the detailed error message I get |
- apache#7170 - Add a `null` check
Just check |
obfuscated.zip |
Apache NetBeans version
Apache NetBeans 21
What happened
In a PHP file, I type "for" or "iter", the autocompletion pop-up opens, I choose the "iter" shortcut to insert the code
for (index=0;$i<count($array);$i++){}
but instead of inserting this code, the line is emptied.The error message is :
A java.lang.NullPointerException has occurred.
Cannot invoke "String.hashCode() because "< local4 >" is null
messages.log
Maybe it is linked to the deactivation of one of the plugins (the only plugin in "Base IDE" category that is inactivated is "Embedded Browser UI - JavaFX WebView").
Language / Project Type / NetBeans Component
PHP
How to reproduce
see "what happened"
Did this work correctly in an earlier version?
No / Don't know
Operating System
win 11
JDK
java version "18.0.2.1" 2022-08-18 Java(TM) SE Runtime Environment (build 18.0.2.1+1-1) Java HotSpot(TM) 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: