I am receiving the Warning:
Warning: Invalid argument supplied for foreach() in wp-content\plugins\imagefx\imagefx.php on line 409
When trying to upload media that is not an image such as a PDF or MP3.
I was able to fix this issue by overriding the imagefx_filter function in my theme and adding a return before the foreach if the $meta variable is empty on line 408
if(empty($meta)) return $meta;