diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-08 19:16:48 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-08 19:16:48 +0000 |
commit | d1a913892591286f4a3cb6759575c3eb037043a2 (patch) | |
tree | 9c3609e7ca522c9912a06ee1c34c730f786bd2ca /modules/exif | |
parent | bf3282cb3c4dfe1f4fae01e15515fa5a86d54bf2 (diff) |
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
Diffstat (limited to 'modules/exif')
-rw-r--r-- | modules/exif/helpers/exif.php | 2 |
1 files changed, 1 insertions, 1 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)); |