Many Errors
#5

For people who come here after searching: the solution for warning 211: possibly unintended assignment is that you are assigning a value inside an IF-statement.

Код:
/**
will 99.9% of times default to TRUE because the value can be assigned
**/
if($value = 1) {
}

/**
This is the correct code. A value is not assigned, but checked for (notice the double equals sign (=) for the single equals sign in the top code
**/
if($value == 1) {
}
Reply


Messages In This Thread
Many Errors - by andreistalker - 13.08.2015, 12:34
Re: Many Errors - by LetsOWN[PL] - 13.08.2015, 12:36
Re: Many Errors - by andreistalker - 13.08.2015, 12:45
Re: Many Errors - by andreistalker - 13.08.2015, 12:50
Re: Many Errors - by mamorunl - 13.08.2015, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)