fix clean() for arrays and user plugin list

This commit is contained in:
Andrew Dolgov 2021-02-06 00:17:41 +03:00
parent 6e774a58fe
commit a544123b59
2 changed files with 2 additions and 2 deletions

View File

@ -950,7 +950,7 @@ class Pref_Prefs extends Handler_Protected {
foreach ($tmppluginhost->get_plugins() as $name => $plugin) { foreach ($tmppluginhost->get_plugins() as $name => $plugin) {
$about = $plugin->about(); $about = $plugin->about();
if ($about[3] ?? false) { if ($about[3] ?? true) {
$checked = ""; $checked = "";
$disabled = ""; $disabled = "";

View File

@ -244,7 +244,7 @@
// this is used for user http parameters unless HTML code is actually needed // this is used for user http parameters unless HTML code is actually needed
function clean($param) { function clean($param) {
if (is_array($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)) { } else if (is_string($param)) {
return trim(strip_tags($param)); return trim(strip_tags($param));
} else { } else {