? 834568-1.patch
Index: em.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_em/em.drush.inc,v
retrieving revision 1.1
diff -u -p -r1.1 em.drush.inc
--- em.drush.inc	21 Jun 2010 20:44:59 -0000	1.1
+++ em.drush.inc	23 Jun 2010 19:34:26 -0000
@@ -32,7 +32,7 @@ define('EM_STATUS_IN_DATABASE', 0x02);
 function em_drush_command() {
   // Some things depend on drush version.
   $drush_three_plus = defined('DRUSH_VERSION');
-  
+
   $items['em-status'] = array(
     'description' => 'Show exportable status of current module, or all modules.',
     // Work around drush 2 thinking that drush_em_status is a hook on the status command.
@@ -102,7 +102,7 @@ function em_drush_command() {
       ),
     );
   }
-  
+
   $items['em-debug'] = array(
     'description' => 'Debug...',
   );
@@ -115,7 +115,7 @@ function em_drush_command() {
       }
     }
   }
-  
+
   return $items;
 }
 
@@ -293,7 +293,7 @@ function em_export($table = NULL, $key =
     $export_types = module_invoke_all('em_exportables');
     drupal_alter('em_exportables', $export_types);
   }
-  
+
   if ($key) {
     return $export_types[$table][$key];
   } elseif ($table) {
@@ -356,7 +356,7 @@ function drush_em_diff() {
   if (drush_get_option('t', FALSE)) {
     $diff_opts .= '--suppress-common-lines';
   }
-  
+
   $export_schemas = em_export();
   foreach ($modules as $module) {
     $output = array();
@@ -623,7 +623,7 @@ function em_write_exportables($module, $
               return drush_set_error('Aborting.');
             }
           }
-        
+
           $output = $export['to hook code callback'](array_keys($objects), $module);
           $code[$api] .= $output;
         }
@@ -649,7 +649,7 @@ function em_write_exportables($module, $
   // avoid odd behaviour in case of the same module being present at different
   // paths.
   $old = getcwd();
- 
+
   chdir(drush_cwd());
   // TODO: The api hook and the dependencies.
   foreach ($code as $api => $hook_code) {
@@ -742,7 +742,7 @@ function em_get_site_exportables($table,
   if (is_null($exportables) and function_exists($export['list callback'])) {
     $exportables = $export['list callback']();
   }
-  $args = $export['load arguments'];
+  $args = isset($export['load arguments']) ? $export['load arguments'] : array();
   if (sizeof($exportables)) {
     $args[] = array_keys($exportables);
     $site_exports = call_user_func_array($export['load callback'], $args);
Index: modules/ctools.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_em/modules/ctools.inc,v
retrieving revision 1.1
diff -u -p -r1.1 ctools.inc
--- modules/ctools.inc	21 Jun 2010 20:41:02 -0000	1.1
+++ modules/ctools.inc	23 Jun 2010 19:34:26 -0000
@@ -18,7 +18,7 @@ function ctools_em_exportables() {
   $schemas = ctools_export_get_schemas(TRUE);
 
   foreach ($schemas as $etable => $schema) {
-    if ($schema['export']['api']) {
+    if (isset($schema['export']['api'])) {
       $export_types[$etable] = array(
         'api' => $schema['export']['api']['api'],
         'identifier' => $schema['export']['identifier'],
@@ -53,7 +53,7 @@ function ctools_em_exportables_alter($ex
     ),
   );
   foreach ($overrides as $name => $override) {
-    if ($export_types[$name]) {
+    if (isset($export_types[$name])) {
       $export_types[$name] = $override + $export_types[$name];
     }
   }
