Closed adrianahdez closed 1 month ago
Hi,
This block normally return true as it is:
true
function get_number() { return '334'; } if ( !is_null( $n = get_number() ) ) { // do something with $n... var_dump(true); } else { var_dump(false); }
And the "ReplaceIsNull" option is changing that if() statement to this:
if()
if ( !null === $n = get_number() ) { ... }
Which is wrong, because it's returning false and it's adding a bug to the code.
In this case, it should be changed to this, in order to work fine:
if ( null !== $n = get_number() ) { ...}
This one was easy, fixed in the latest version
oh, that was fast. Many thanks :)
Hi,
This block normally return
true
as it is:And the "ReplaceIsNull" option is changing that
if()
statement to this:if ( !null === $n = get_number() ) { ... }
Which is wrong, because it's returning false and it's adding a bug to the code.
In this case, it should be changed to this, in order to work fine:
if ( null !== $n = get_number() ) { ...}