Netbeans: How to disable this single annoying warn

2020-08-09 10:32发布

The same problem which is occuring in this question is happening a lot to me: Warning "Do not Access Superglobal $_POST Array Directly" on Netbeans 7.4 for PHP

However - of course I take care with $_POST and user input etc. but I do this with custom functions which NetBeans does not understand and therefore my IDE is full of warnings.

Another annoying example: "Too many nested blocks in function declaration". Of course you should avoid that, but I think this is not always possible.

How can I disable single warnings in the Netbeans IDE while still keeping all other warnings?

1条回答
闹够了就滚
2楼-- · 2020-08-09 11:11
  1. Netbeans is not asking you to be careful. Netbeans is asking you to use the filter_input function (PHP 5.2+) to totally replace $_XXYY.

  2. You can switch off individual hint types from Tools > Options dialog. You can also change variables like how many nested blocks is too many:

Editor > Hints > Language: PHP > Nested Blocks / Superglobals

查看更多
登录 后发表回答