tag_is_valid: check numeric tags properly

This commit is contained in:
Andrew Dolgov 2015-12-30 15:14:01 +03:00
parent 9842b51c71
commit 85d067e837
1 changed files with 1 additions and 1 deletions

View File

@ -1156,7 +1156,7 @@
function tag_is_valid($tag) { function tag_is_valid($tag) {
if ($tag == '') return false; if ($tag == '') return false;
if (preg_match("/^[0-9]*$/", $tag)) return false; if (is_numeric($tag)) return false;
if (mb_strlen($tag) > 250) return false; if (mb_strlen($tag) > 250) return false;
if (!$tag) return false; if (!$tag) return false;