diff options
author | wn_ <[email protected]> | 2021-11-11 19:59:25 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2021-11-11 19:59:25 +0000 |
commit | 03495c11ed69f6311e9c7596cc53c5b15ce82bf6 (patch) | |
tree | d507596078eeff445b4310690ae3fcbf82b46976 /include/functions.php | |
parent | 3f8aaffd3499cd49912c3e2cb663d8572a96851e (diff) |
Address PHPStan warnings in 'classes/sanitizer.php'.
This also includes some minor tweaks to things that call 'Sanitizer::sanitize()'.
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index 36519fd44..238cbe7f5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -181,8 +181,14 @@ return Feeds::_get_counters($feed, $is_cat, true, $_SESSION["uid"]); } - /** function is @deprecated by Sanitizer::sanitize() */ - function sanitize($str, $force_remove_images = false, $owner = false, $site_url = false, $highlight_words = false, $article_id = false) { + /** + * @deprecated by Sanitizer::sanitize() + * + * @param array<int, string>|null $highlight_words Words to highlight in the HTML output. + * + * @return false|string The HTML, or false if an error occurred. + */ + function sanitize(string $str, bool $force_remove_images = false, int $owner = null, string $site_url = null, array $highlight_words = null, int $article_id = null) { return Sanitizer::sanitize($str, $force_remove_images, $owner, $site_url, $highlight_words, $article_id); } |