[eluser]Vangelis B[/eluser]
[quote author="rogierb" date="1266418911"]The order shouldn't matter.
Can you debug set_allowed_types() to see what $types and $this->allowed_types are?[/quote]
Unfortunately the people are right. The order does matter. The reason is that the upload library first does a check for images before check in the config/mimes.php. The library checks to see if the temp file (during the upload) returns an image size. Unfortunately it does the check for files that are not images as well. Obviously this is a bug.
A temporary solution is to comment the following lines in system/libraries/upload.php
Code:
if (in_array($val, $image_types)){
if (getimagesize($this->file_temp) === FALSE){
return FALSE;
}
}
they are around line 565
I'll submit this bug and lets hope that CI devs will come up with a fix in the next CI version.