diff options
author | Andrew Dolgov <[email protected]> | 2018-02-11 10:26:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-02-11 10:26:33 +0300 |
commit | 2eaf2a1f3647b2593513db1dc823ad26ee4082d0 (patch) | |
tree | 276330fd1ab91f4497d7c3b1ab0c0f3e12b4eda9 /include | |
parent | 5edf4b73a439102ab18494375ee4ce4ab93c1b2b (diff) |
tag_is_valid: simplify code
Diffstat (limited to 'include')
-rwxr-xr-x | include/functions.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/functions.php b/include/functions.php index 8a869dc08..ebf4021ae 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; } |