CodeIgniter
CodeIgniter copied to clipboard
Bug in Common.php get_mimes function
This function always return 1. The code must be:
function &get_mimes()
{
static $_mimes = array();
if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
$_mimes = $mimes;
}
elseif (is_file(APPPATH.'config/mimes.php'))
{
include(APPPATH.'config/mimes.php');
$_mimes = $mimes;
}
return $_mimes;
}
@pro85 This needs to be a pull request as this doesn't reference out the previous function so that I can view the difference from the current to the one you're requesting to be changed to.
There's nothing wrong with it. Newest version of application/config/mimes.php directly returns an array instead of defining it by name.
You right i don't update config file with changes.