From 2422aae57711fafcedde6b381a0624ca67fa79cb Mon Sep 17 00:00:00 2001 From: wn_ Date: Thu, 18 Nov 2021 18:07:43 +0000 Subject: Consistently handle param string to bool conversions in handlers. --- classes/handler.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'classes/handler.php') diff --git a/classes/handler.php b/classes/handler.php index 3ee42cedb..aca5bf4d2 100644 --- a/classes/handler.php +++ b/classes/handler.php @@ -27,4 +27,10 @@ class Handler implements IHandler { return true; } + /** + * @param mixed $p + */ + protected static function _param_to_bool($p): bool { + return $p && ($p !== "f" && $p !== "false"); + } } -- cgit v1.2.3-54-g00ecf