You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty sure this doesn't do what it was intended to. The bool cast applies to the left hand argument as opposed to the result of the comparison. In Magento a product has a status of 2 when it is explicitly disabled. In that instance this line essentially becomes:
$tmp['is_active'] = (bool) 2 == 1;
PHP will bool cast the 2 to be true in which case it's:
$tmp['is_active'] = true == 1;
Which is true.
The result of this is that every product that has a status explicitly set, regardless of enabled or disabled will return is_active = true.
The text was updated successfully, but these errors were encountered:
Pretty sure this doesn't do what it was intended to. The bool cast applies to the left hand argument as opposed to the result of the comparison. In Magento a product has a status of 2 when it is explicitly disabled. In that instance this line essentially becomes:
PHP will bool cast the 2 to be true in which case it's:
Which is true.
The result of this is that every product that has a status explicitly set, regardless of enabled or disabled will return is_active = true.
The text was updated successfully, but these errors were encountered: