summaryrefslogtreecommitdiffstats
path: root/system/helpers/file_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/file_helper.php')
-rw-r--r--system/helpers/file_helper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 0061c4285..068706c30 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -349,17 +349,17 @@ if ( ! function_exists('get_mime_by_extension'))
{
$extension = strtolower(substr(strrchr($file, '.'), 1));
- global $mimes;
+ static $mimes;
if ( ! is_array($mimes))
{
if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
+ $mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
}
elseif (is_file(APPPATH.'config/mimes.php'))
{
- include(APPPATH.'config/mimes.php');
+ $mimes = include(APPPATH.'config/mimes.php');
}
if ( ! is_array($mimes))