Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6883517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:23:36+00:00 2026-05-27T05:23:36+00:00

I have a PHP file with a line that produces a warning in NetBeans.

  • 0

I have a PHP file with a line that produces a warning in NetBeans. How can I force the IDE to ignore that concrete warning?

Notice that I don’t want to disable this type of warning solution-wide.

Here is a sample line of code:

if ($query = db_query("SELECT column FROM {table} WHERE type='some_value'")) { ... }

Here is a text of produced warning: ‘Possible accidental assignment, assignments in conditions should be avoided.’


I know how to correct the code, but notice that I’ve asked completely other question! I need a way to suppress the warning having the same statement in the if clause.

I’m not going to use the @ operator either, because it has a completely other mission.

Below you can see how I suppress the ReSharper warning(s) in C#. I want something like that in PHP for NetBeans:

// ReSharper disable PossibleNullReferenceException
_currentPage = restoredStageSurvey._currentPage;
// ReSharper restore PossibleNullReferenceException
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:23:36+00:00Added an answer on May 27, 2026 at 5:23 am

    While you can’t just disable one warning (look for bug reports like http://netbeans.org/bugzilla/show_bug.cgi?id=97224), there is a common solution for this problem (if you have "Ignore assignments in sub-statements" turned ON):

    if(($x=$y)) {}
    

    TLDR: Double brackets = Ignore this type of warning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery script that searches a php file that produces an XML
I have a php script that i run via command line like php file.php
I have a PHP file that contains a lot of if and else statements
I have a php file somejson.php that echos a json encoded array {jsonone:first json,jsontwo:second
I have a php file that contains a form (which contains 2 input boxes
I have a PHP file which produces an Xml sitemap based on data which
I have a php file that is only accessed through ajax. The ajax call
I have a php-file which includes another html-file: <? virtual(../top.html);?> The problem is that
So, ok. I have many php files and one index.php file. All files can't
I have php file with a class in it that needs to read a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.