Welcome Guest, Not a member yet? Register   Sign In
Issue with filetypes and Upload class (new in 1.7.2)?

[eluser]Stu Green[/eluser]

I've just found a new problem since upgrading to 1.7.2.

If I set an array of allowed filetypes ('jpg', 'gif', 'pdf', 'doc'), and then try to upload a PDF file it now breaks, whereas before it worked.

I looked in to this, and in the Upload library under is_allowed_filetype() there is new code that says:

// Images get some additional checks
            if (in_array($val, $image_types))
                if (getimagesize($this->file_temp) === FALSE)
                    return FALSE;

Now if I'm saying that both images and PDF files are allowed types, this will break because JPG is in the array but it returns false before it gets there.

Can someone shed some light on this?


[eluser]Stu Green[/eluser]
Sorry I think I posted in the wrong forum.

[eluser]Stu Green[/eluser]
Can this be moved to the bugs forum thanks.

Theme © iAndrew 2016 - Forum software by © MyBB