diff options
author | vlakoff <vlakoff@gmail.com> | 2014-05-19 13:45:12 +0200 |
---|---|---|
committer | vlakoff <vlakoff@gmail.com> | 2014-05-19 13:45:12 +0200 |
commit | 66c7bb41310ea7543cfeac5b008fa24d30e962e1 (patch) | |
tree | e613da897617b0a86e9f64cf1a509f4b4aa4147b | |
parent | 69550c5525efa018fb89ca15e979a7e76608a117 (diff) |
Remove static cache in Email->_mimes_types()
Saving one function call isn't worth the code overhead.
-rw-r--r-- | system/libraries/Email.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 011a88c22..63b7dc31c 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -2234,17 +2234,9 @@ class CI_Email { */ protected function _mime_types($ext = '') { - static $_mimes; - $ext = strtolower($ext); - if (empty($_mimes)) - { - // references cannot be directly assigned to static variables, so we use an array - $_mimes[0] =& get_mimes(); - } - - $mimes =& $_mimes[0]; + $mimes =& get_mimes(); if (isset($mimes[$ext])) { |