From a544123b593f3c20d1bf6623ba61e5be61b47996 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 6 Feb 2021 00:17:41 +0300 Subject: [PATCH] fix clean() for arrays and user plugin list --- classes/pref/prefs.php | 2 +- include/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index a77c1abaa..907c639b3 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -950,7 +950,7 @@ class Pref_Prefs extends Handler_Protected { foreach ($tmppluginhost->get_plugins() as $name => $plugin) { $about = $plugin->about(); - if ($about[3] ?? false) { + if ($about[3] ?? true) { $checked = ""; $disabled = ""; diff --git a/include/functions.php b/include/functions.php index 2db559a92..f870f3382 100644 --- a/include/functions.php +++ b/include/functions.php @@ -244,7 +244,7 @@ // this is used for user http parameters unless HTML code is actually needed function clean($param) { if (is_array($param)) { - return trim(array_map("strip_tags", $param)); + return array_map("trim", array_map("strip_tags", $param)); } else if (is_string($param)) { return trim(strip_tags($param)); } else {