summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/exif/helpers/exif.php2
-rw-r--r--modules/tag/helpers/tag_event.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php
index bf6ad478..3b61f41c 100644
--- a/modules/exif/helpers/exif.php
+++ b/modules/exif/helpers/exif.php
@@ -38,7 +38,7 @@ class exif_Core {
foreach(self::_keys() as $field => $exifvar) {
if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) {
$value = $exif_raw[$exifvar[0]][$exifvar[1]];
- if (mb_detect_encoding($value) != "UTF-8") {
+ if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") {
$value = utf8_encode($value);
}
$data[] = sprintf("(%d, '%s', '%s')", $item->id, $field, $db->escape_str($value));
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;