PHP 7.3.1 0 and empty entities evaluating to true?

Snog

Well-known member
Has anyone heard of a bug in 7.3.1 where entity values might evaluate to TRUE when they contain 0 or are empty ("");

$entity->field1 = 0
$entity->field2 = ""
 
I'm asking because I've run into a situation where the last two items in this IF equated to true (they are 0 and "" respectively) and code was executed that shouldn't have been...
Code:
if (!$entity->value1 && $entity->value2 && $entity->value3)
{
    .....
}

When the site was updated to PHP 7.3.3 the code executed properly again. But I don't see any reports in the PHP change logs that might be related (other than maybe an mbstring problem).
 
Back
Top Bottom