• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.