From d1a913892591286f4a3cb6759575c3eb037043a2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 8 May 2009 19:16:48 +0000 Subject: Don't try to use mb_detect_encoding if the module isn't loaded. Not sure if this is a great solution, but it'll probably cut down on a big class of errors opportunistically --- modules/tag/helpers/tag_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/tag/helpers') diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index a4a6ec26..26f157a6 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -34,7 +34,7 @@ class tag_event_Core { if (!empty($iptc["2#025"])) { foreach($iptc["2#025"] as $tag) { $tag = str_replace("\0", "", $tag); - if (mb_detect_encoding($tag) != "UTF-8") { + if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { $tag = utf8_encode($tag); } $tags[$tag] = 1; -- cgit v1.2.3