Index: galleryformatter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/galleryformatter/galleryformatter.module,v
retrieving revision 1.4.2.9
diff -u -p -r1.4.2.9 galleryformatter.module
--- galleryformatter.module	30 Jan 2011 19:59:58 -0000	1.4.2.9
+++ galleryformatter.module	31 Jan 2011 10:45:53 -0000
@@ -11,7 +11,7 @@ function galleryformatter_field_formatte
   return array(
     'galleryformatter_default' => array(
       'label' => t('jQuery Gallery'),
-      'field types' => array('image'),
+      'field types' => array('image', 'media'),
       'settings' => array(
         'slide_style' => 'galleryformatter_slide',
         'thumb_style' => 'galleryformatter_thumb',
@@ -164,11 +164,16 @@ function galleryformatter_field_formatte
   $renderitems = array();
   $renderitems['thumbs'] = array();
   foreach ($items as $delta => $item){
+    // make sure our items are arrays if coming from media module
+    if($field['type'] == 'media'){
+      $items[$delta] = $item = (array)$item;
+    }
     /*
      *  prepare slides
      */
     // Grab and sanitize image information
     // $renderitems['slides'][$delta]['description'] = $item['description']; // so far no description in d7 image fields
+    $item['title'] = (!empty($item['title'])) ? $item['title'] : ''; // prevents php notices
     $renderitems['slides'][$delta]['title'] = $item['title'];
 
     // Check if alt attribute is already set, if not use the filename as alt attribute
