Skip to content
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: NullPointerException when generating a field or constant using Introduce Hint #6266

Closed
troizet opened this issue Jul 28, 2023 · 0 comments · Fixed by #6269
Closed

PHP: NullPointerException when generating a field or constant using Introduce Hint #6266

troizet opened this issue Jul 28, 2023 · 0 comments · Fixed by #6269
Assignees
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)
Milestone

Comments

@troizet
Copy link
Collaborator

troizet commented Jul 28, 2023

Apache NetBeans version

Apache NetBeans 18

What happened

NullPointerException when generating a field or constant using Introduce Hint

How to reproduce

  • create a TestClass.php file with the TestClass class:
<?php

class TestClass {
}
  • сreate a test.php file with the code:
<?php

TestClass::generatedConstant;

or

<?php

TestClass::$generatedField;

or

<?php

$cls = new TestClass();
$cls->generatedField;
  • set the caret to generatedConstant or generatedField
  • press Alt + Enter, then press Create Constant or Create Field

Did this work correctly in an earlier version?

No / Don't know

Operating System

Debian GNU/Linux 12 (bookworm)

JDK

OpenJDK Runtime Environment 17.0.7+7-Debian-1deb12u1

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

bug similar to #6258

Are you willing to submit a pull request?

No

@troizet troizet added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Jul 28, 2023
@junichi11 junichi11 self-assigned this Jul 28, 2023
@junichi11 junichi11 added PHP [ci] enable extra PHP tests (php/php.editor) and removed needs:triage Requires attention from one of the committers labels Jul 28, 2023
@junichi11 junichi11 added this to the NB20 milestone Jul 28, 2023
junichi11 added a commit to junichi11/netbeans that referenced this issue Jul 28, 2023
@junichi11 junichi11 linked a pull request Jul 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants