From d78ba7b3a9201b7c9a17d376ac9d2629d761ce5a Mon Sep 17 00:00:00 2001 From: wn_ Date: Tue, 16 Nov 2021 02:14:31 +0000 Subject: [PATCH] Minor fix in 'classes/articles.php'. It looks like these functions are dead code, though. Adding comments for future review. --- classes/article.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/article.php b/classes/article.php index 1f97f0e16..d14236ea2 100755 --- a/classes/article.php +++ b/classes/article.php @@ -257,18 +257,21 @@ class Article extends Handler_Protected { print ""; }*/ + // TODO: dead code? function assigntolabel(): void { $this->_label_ops(true); } + // TODO: dead code? function removefromlabel(): void { $this->_label_ops(false); } + // TODO: dead code? private function _label_ops(bool $assign): void { $reply = array(); - $ids = array_map("intval", explode(",", clean($_REQUEST["ids"] ?? []))); + $ids = array_map("intval", array_filter(explode(",", clean($_REQUEST["ids"] ?? "")), "strlen")); $label_id = clean($_REQUEST["lid"]); $label = Labels::find_caption($label_id, $_SESSION["uid"]);