Add some more truth states to test
This commit is contained in:
@@ -10,12 +10,18 @@ if(!function_exists('get_truth_state')) {
|
||||
function get_truth_state($state)
|
||||
{
|
||||
$enabledStates = [
|
||||
'yes',
|
||||
'y',
|
||||
'on',
|
||||
'true',
|
||||
'1',
|
||||
true,
|
||||
];
|
||||
|
||||
if(is_string($state)) {
|
||||
$state = strtolower($state);
|
||||
}
|
||||
|
||||
return \in_array($state, $enabledStates, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user