From: Andrew Dolgov Date: Sun, 11 Feb 2018 07:26:33 +0000 (+0300) Subject: tag_is_valid: simplify code X-Git-Tag: 18.8~67 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2eaf2a1f3647b2593513db1dc823ad26ee4082d0;p=tt-rss.git tag_is_valid: simplify code --- diff --git a/include/functions.php b/include/functions.php index 8a869dc0..ebf4021a 100755 --- a/include/functions.php +++ b/include/functions.php @@ -1753,11 +1753,8 @@ } function tag_is_valid($tag) { - if ($tag == '') return false; - if (is_numeric($tag)) return false; - if (mb_strlen($tag) > 250) return false; - - if (!$tag) return false; + if (!$tag || is_numeric($tag) || mb_strlen($tag) > 250) + return false; return true; }