Fix bug where all literal "false" was interpreted as true

This commit is contained in:
Bofh 2022-12-11 17:11:41 +01:00
parent cebbdfdf59
commit 836dae9c18
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ function matches_comparing_expression($expr, $text) {
$result = str_replace('OR', '|', $result); $result = str_replace('OR', '|', $result);
$result = str_replace('AND', '&', $result); $result = str_replace('AND', '&', $result);
eval('$result = '.$result.';'); eval('$result = '.$result.';');
return $result === 0 ? false : true; return in_array($result, [0,false]) ? false : true;
} }
function content_cache__exists($key) { function content_cache__exists($key) {