tag_is_valid: simplify code

This commit is contained in:
Andrew Dolgov 2018-02-11 10:26:33 +03:00
parent 5edf4b73a4
commit 2eaf2a1f36
1 changed files with 2 additions and 5 deletions

View File

@ -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;
}