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
Observed:
When the dot fails to know if the right operand is a field/property of the left operand, it returns an array [left, right] so it can be tried as a callable if called.
When this array is passed to a condition (evaluated as a boolean) it's always true even if the right operand does not match anything truthy in the left operand.
When it's sent to the output (evaluated as a string), it fails because PHP cannot cast arrays to string.
Expected:
When this array is passed to a condition (evaluated as a boolean) it's always true even if the right operand does not match anything truthy in the left operand.
When it's sent to the output (evaluated as a string), it fails because PHP cannot cast arrays to string.
Solution proposal:
This array should be wrapped in an object that:
can be cast to string according to the property/field value;
is callable as the original array would be;
provies a __toBoolean method that other libraries (like Phug/Pug-php) could use to cast it as a boolean.
The text was updated successfully, but these errors were encountered:
Fixes BKWLD/laravel-pug#82
Observed:
When the dot fails to know if the right operand is a field/property of the left operand, it returns an array [left, right] so it can be tried as a callable if called.
Expected:
Solution proposal:
This array should be wrapped in an object that:
The text was updated successfully, but these errors were encountered: