--- includes/form.inc	2008-05-06 17:44:17.000000000 +0300
+++ includes/form.inc.spiral	2008-05-06 17:43:56.000000000 +0300
@@ -868,6 +868,7 @@
   // Recurse through all child elements.
   $count = 0;
   foreach (element_children($form) as $key) {
+    if(!is_array($form[$key]))  $form[$key]= array();
     $form[$key]['#post'] = $form['#post'];
     $form[$key]['#programmed'] = $form['#programmed'];
     // Don't squash an existing tree value.
