Notice bug fix:

diff -r sites/all/modules/imagefield/imagefield_file.inc
--- a/sites/all/modules/imagefield/imagefield_file.inc
+++ b/sites/all/modules/imagefield/imagefield_file.inc
@@ -29,7 +29,13 @@
  */
 function imagefield_file_is_image($file) {
   $file = (object)$file;
-  return in_array($file->filemime, array('image/jpg', 'image/pjpeg', 'image/jpeg', 'image/png', 'image/gif'));
+  if (isset($file->filemime)) {
+    $result = in_array($file->filemime, array('image/jpg', 'image/pjpeg', 'image/jpeg', 'image/png', 'image/gif'));
+  }
+  else {
+    $result = FALSE;
+  }
+  return $result;
 }
 
 /**

Comments

quicksketch’s picture

Could you describe a situation in which this notice appears? Clearly it's going to deny access in the situation that a notice would occur, but I'm not sure what would cause this to arise.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of response. Please reopen if you can provide steps to reproduce the notice.