Index: includes/export.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/export.inc,v retrieving revision 1.19.2.2 diff -u -p -r1.19.2.2 export.inc --- includes/export.inc 8 Oct 2009 16:12:17 -0000 1.19.2.2 +++ includes/export.inc 6 Nov 2009 21:33:25 -0000 @@ -629,11 +629,12 @@ function ctools_export_to_hook_code(&$co $output .= " * Implementation of hook_{$export['default hook']}()\n"; $output .= " */\n"; $output .= "function " . $name . "_{$export['default hook']}() {\n"; + $output .= " \${$export['identifier']}s = array();\n\n"; foreach ($objects as $object) { $output .= $export['export callback']($object, ' '); // if this function does not exist, better to error out than fail silently $output .= " \${$export['identifier']}s['" . check_plain($object->$export['key']) . "'] = \${$export['identifier']};\n\n"; } - $output .= " return \${$export['identifier']}s;\n"; + $output .= " return \${$export['identifier']}s;\n"; $output .= "}\n"; } }