diff options
| author | fox <fox@noreply.tt-rss.org> | 2021-11-19 07:36:15 +0300 |
|---|---|---|
| committer | fox <fox@noreply.tt-rss.org> | 2021-11-19 07:36:15 +0300 |
| commit | 0a3a464defbe67092a0bd155cb2f6afcf379da2e (patch) | |
| tree | df4d699e5d11d5a6f19f26472a1702cbcbad7f4e /classes/handler.php | |
| parent | 3070933f649c097ca8ed02a8aea61eede1408b45 (diff) | |
| parent | 4a891b20f06e04b015d4da9b755d444b915f4b7d (diff) | |
Merge pull request 'Consistently handle param string to bool conversions in handlers.' (#53) from wn/tt-rss:feature/consistent-param-to-bool into master
Reviewed-on: https://git.tt-rss.org/fox/tt-rss/pulls/53
Diffstat (limited to 'classes/handler.php')
| -rw-r--r-- | classes/handler.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/classes/handler.php b/classes/handler.php index 3ee42cedb..806c9cfbe 100644 --- a/classes/handler.php +++ b/classes/handler.php @@ -27,4 +27,11 @@ class Handler implements IHandler { return true; } + /** + * @param mixed $p + */ + protected static function _param_to_bool($p): bool { + $p = clean($p); + return $p && ($p !== "f" && $p !== "false"); + } } |