when uploading jpegs. the built in php getimagesize method fails to get a value for height, but returns 0. The code checks for empty which 0 is. I suggest the patch for this is to replace 'empty' with '!isset'. for the file measurement check in the filespec.php code.