]> git.wh0rd.org Git - tt-rss.git/commitdiff
tag_is_valid: only call iconv() when function exists
authorAndrew Dolgov <fox@madoka.spb.ru>
Sat, 22 Nov 2008 06:20:45 +0000 (07:20 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sat, 22 Nov 2008 06:20:45 +0000 (07:20 +0100)
functions.php

index a800a6a83ae05bcb411c7f5c92f89dd69de96dd9..4d3e8c7b6660c2f4e096105058c1683938fab571 100644 (file)
                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;