valums/file-uploader — pull request #526 by KJLJon (2012-12-10 05:41:51+00:00)
Title: Checks if $_SERVER['CONTENT_TYPE'] exists

#442 references this same problem but uses throw error (where this change returns a more friendly error)

This checks the content type and sets $this->file = false if it's not set

To address the question raised in #442:
if $_SERVER['CONTENT_TYPE'] isn't set it causes php to fatal error (IE: the user tries to run the script w/o an uploaded file)

the code was already their to check if $this->file = false to output an error

This was tested on IE9 and Chrome 23.

I also reformatted some of the code to maintain consistency (some of the lines used tabs while most of them used 4 spaces, so I converted all the tabs to 4 spaces)