From: Andrew Dolgov Date: Sat, 22 Nov 2008 06:20:45 +0000 (+0100) Subject: tag_is_valid: only call iconv() when function exists X-Git-Tag: 1.2.30~30 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=31365729dc7a373f224e762e8dbe663529543655;p=tt-rss.git tag_is_valid: only call iconv() when function exists --- diff --git a/functions.php b/functions.php index a800a6a8..4d3e8c7b 100644 --- a/functions.php +++ b/functions.php @@ -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;