tag_is_valid: only call iconv() when function exists

This commit is contained in:
Andrew Dolgov 2008-11-22 07:20:45 +01:00
parent 19a1da0d7a
commit 31365729dc
1 changed files with 4 additions and 1 deletions

View File

@ -4503,7 +4503,10 @@
if ($tag == '') return false;
if (preg_match("/^[0-9]*$/", $tag)) return false;
$tag = iconv("utf-8", "utf-8", $tag);
if (function_exists('iconv')) {
$tag = iconv("utf-8", "utf-8", $tag);
}
if (!$tag) return false;
return true;