Index: content.node_form.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/Attic/content.node_form.inc,v
retrieving revision 1.7.2.19.2.4
diff -u -r1.7.2.19.2.4 content.node_form.inc
--- content.node_form.inc	5 Oct 2009 00:40:40 -0000	1.7.2.19.2.4
+++ content.node_form.inc	16 Oct 2009 22:46:19 -0000
@@ -502,8 +502,14 @@
   // form elements that were initially specified in the Drupal.settings object.
   // The new ones didn't exist then, so we need to update Drupal.settings
   // by ourselves in order to let AHAH know about those new form elements.
-  $javascript = drupal_add_js(NULL, NULL);
-  $output_js = isset($javascript['setting']) ? '<script type="text/javascript">jQuery.extend(Drupal.settings, '. drupal_to_js(call_user_func_array('array_merge_recursive', $javascript['setting'])) .');</script>' : '';
+  $javascript = drupal_add_js(NULL, NULL, NULL);
+  $settings = array();
+  foreach ($javascript as $scope => $arr) {
+    if (isset($arr['setting'])) {
+      $settings = array_merge($settings, $arr['setting']);
+    }
+  }
+  $output_js = empty($settings) ? '' : '<script type="text/javascript">jQuery.extend(Drupal.settings, '. drupal_to_js(call_user_func_array('array_merge_recursive', $settings)) .');</script>';
 
   $output = theme('status_messages') . drupal_render($field_form) . $output_js;
 

