diff options
Diffstat (limited to 'includes/stream_wrappers.inc')
-rw-r--r-- | includes/stream_wrappers.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index cb642d979..6841325cc 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -194,8 +194,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface static function getMimeType($uri, $mapping = NULL) { if (!isset($mapping)) { $mapping = variable_get('mime_extension_mapping', NULL); - if (!isset($mapping)) { - include_once DRUPAL_ROOT . '/includes/file.mimetypes.inc'; + if (!isset($mapping) && drupal_function_exists('file_default_mimetype_mapping')) { // The default file map, defined in file.mimetypes.inc is quite big. // We only load it when necessary. $mapping = file_default_mimetype_mapping(); |