ideasonpurpose / wp-related-posts

Library for gathering related posts based on various weightings
0 stars 0 forks source link

Boolean properties may be string representations of booleans #5

Closed joemaller closed 3 weeks ago

joemaller commented 3 weeks ago

Some of boolean settings are coming back from the block editor as boolean-ish strings. This is obviously a problem with "false" since PHP coerces non-empty strings to true:

$var = "false";
$ugh = (bool) $var;  // coerces to true