? 684016.patch
Index: storm.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/storm.module,v
retrieving revision 1.10.4.55
diff -u -p -r1.10.4.55 storm.module
--- storm.module	30 Jun 2010 16:31:26 -0000	1.10.4.55
+++ storm.module	17 Jul 2010 14:04:34 -0000
@@ -833,13 +833,13 @@ function storm_form_alter(&$form, $form_
   }
 
   if ($form_id == $form['type']['#value'] .'_node_form') {
-    $class = $form['#attributes']['class'];
-    if ($class) $class .= ' ';
+    if (isset($form['#attributes']['class'])) $class = $form['#attributes']['class'];
+    if (isset($class)) $class .= ' ';
     $class .= $form_id;
     $form['#attributes']['class'] = $class;
     foreach ($form as $key => $elem) {
-      if (is_array($elem) && $elem['#type']=='fieldset') {
-        $class = $elem['#attributes']['class'];
+      if (is_array($elem) && (!isset($elem['#type']) ? '' : $elem['#type'])=='fieldset') {
+        $class = (!isset($elem['#attributes']['class'])) ? '' : $elem['#attributes']['class'];
         if ($class) $class .= ' ';
         $class .= $key;
         $form[$key]['#attributes']['class'] = $class;
Index: storm.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/storm.theme.inc,v
retrieving revision 1.6.4.33
diff -u -p -r1.6.4.33 storm.theme.inc
--- storm.theme.inc	30 Jun 2010 16:46:08 -0000	1.6.4.33
+++ storm.theme.inc	17 Jul 2010 14:04:34 -0000
@@ -8,6 +8,7 @@
 
 function theme_storm_form_group($form) {
   drupal_add_css(drupal_get_path('module', 'storm') .'/storm.css', 'module');
+  $output = null; // Variable set as per issue 684016.
 
   $row = array();
   foreach (element_children($form) as $key) {
Index: stormknowledgebase/stormknowledgebase.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormknowledgebase/stormknowledgebase.module,v
retrieving revision 1.3.4.24
diff -u -p -r1.3.4.24 stormknowledgebase.module
--- stormknowledgebase/stormknowledgebase.module	27 Sep 2009 23:19:56 -0000	1.3.4.24
+++ stormknowledgebase/stormknowledgebase.module	17 Jul 2010 14:04:35 -0000
@@ -188,7 +188,7 @@ function stormknowledgebase_form(&$node)
   $form['group1']['topic'] = array(
     '#type' => 'select',
     '#title' => t('Topic'),
-    '#default_value' => $node->topic,
+    '#default_value' => !isset($node->topic) ? '' : $node->topic,
     '#options' => $topic_list['values'],
   );
 
Index: stormorganization/stormorganization.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormorganization/stormorganization.module,v
retrieving revision 1.11.4.38
diff -u -p -r1.11.4.38 stormorganization.module
--- stormorganization/stormorganization.module	16 Apr 2010 14:08:02 -0000	1.11.4.38
+++ stormorganization/stormorganization.module	17 Jul 2010 14:04:35 -0000
@@ -264,14 +264,14 @@ function stormorganization_form(&$node) 
     '#type' => 'textfield',
     '#title' => t('Prefix'),
     '#size' => 20,
-    '#default_value' => $node->prefix,
+    '#default_value' => !isset($node->prefix) ? null : $node->prefix,
   );
 
   $form['group2']['fullname'] = array(
     '#type' => 'textfield',
     '#title' => t('Fullname'),
     '#size' => 40,
-    '#default_value' => $node->fullname,
+    '#default_value' => !isset($node->fullname) ? null : $node->fullname,
   );
 
   $form['group3'] = array(
@@ -283,7 +283,7 @@ function stormorganization_form(&$node) 
   $form['group3']['address'] = array(
     '#type' => 'textfield',
     '#title' => t('Address'),
-    '#default_value' => $node->address,
+    '#default_value' => !isset($node->address) ? null : $node->address,
     '#weight' => 1,
   );
 
@@ -291,7 +291,7 @@ function stormorganization_form(&$node) 
     '#type' => 'textfield',
     '#title' => t('City'),
     '#size' => 20,
-    '#default_value' => $node->city,
+    '#default_value' => !isset($node->city) ? null : $node->city,
     '#weight' => 2,
   );
 
@@ -299,7 +299,7 @@ function stormorganization_form(&$node) 
     '#type' => 'textfield',
     '#title' => t('Province / State'),
     '#size' => 20,
-    '#default_value' => $node->provstate,
+    '#default_value' => !isset($node->provstate) ? null : $node->provstate,
     '#weight' => 3,
   );
 
@@ -316,7 +316,7 @@ function stormorganization_form(&$node) 
     '#type' => 'textfield',
     '#title' => t('Zip'),
     '#size' => 15,
-    '#default_value' => $node->zip,
+    '#default_value' => !isset($node->zip) ? null : $node->zip,
     '#weight' => 5,
   );
 
@@ -329,21 +329,21 @@ function stormorganization_form(&$node) 
   $form['group4']['phone'] = array(
     '#type' => 'textfield',
     '#title' => t('Phone'),
-    '#default_value' => $node->phone,
+    '#default_value' => !isset($node->phone) ? null : $node->phone,
   );
   
   $form['group4']['www'] = array(
     '#type' => 'textfield',
     '#title' => t('WWW'),
     '#size' => 30,
-    '#default_value' => $node->www,
+    '#default_value' => !isset($node->www) ? null : $node->www,
   );
 
   $form['group4']['email'] = array(
     '#type' => 'textfield',
     '#title' => t('Email'),
     '#size' => 30,
-    '#default_value' => $node->email,
+    '#default_value' => !isset($node->email) ? null : $node->email,
   );
 
   $form['group5'] = array(
@@ -372,7 +372,7 @@ function stormorganization_form(&$node) 
     '#title' => t('Price'),
     '#type' => 'textfield',
     '#size' => 15,
-    '#default_value' => $node->price,
+    '#default_value' => !isset($node->price) ? null : $node->price,
   );
 
   $languages = language_list('language', TRUE);
@@ -384,14 +384,14 @@ function stormorganization_form(&$node) 
     '#type' => 'select',
     '#title' => t('Language'),
     '#options' => $languages_options,
-    '#default_value' => $node->orglanguage,
+    '#default_value' => !isset($node->orglanguage) ? null : $node->orglanguage,
   );
 
   $form['group5']['taxid'] = array(
     '#type' => 'textfield',
     '#title' => t('Tax ID'),
     '#size' => 20,
-    '#default_value' => $node->taxid,
+    '#default_value' => !isset($node->taxid) ? null : $node->taxid,
   );
   
   if ($type->has_body) {
@@ -400,7 +400,7 @@ function stormorganization_form(&$node) 
 
   $form['title_old'] = array(
     '#type' => 'hidden',
-    '#default_value' => $node->title_old,
+    '#default_value' => !isset($node->title_old) ? null : $node->title_old,
   );
 
   return $form;
@@ -442,8 +442,9 @@ function stormorganization_update($node)
 function stormorganization_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
     case 'prepare':
-      if(!$node->nid) {
+      if(!isset($node->nid)) {
         $node->iscustomer = 1;
+        $node->isprovider = 0;
         $node->isactive = 1;
 
         $country_list = stormattribute_attributes_bydomain('Country');
Index: stormorganization/stormorganization.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormorganization/stormorganization.theme.inc,v
retrieving revision 1.2.4.20
diff -u -p -r1.2.4.20 stormorganization.theme.inc
--- stormorganization/stormorganization.theme.inc	14 Jun 2010 19:09:12 -0000	1.2.4.20
+++ stormorganization/stormorganization.theme.inc	17 Jul 2010 14:04:35 -0000
@@ -60,7 +60,7 @@ function theme_stormorganization_view($n
     '#prefix' => '<div class="fullname">',
     '#suffix' => '</div>',
     '#value' => theme('storm_view_item', t('Fullname'), check_plain($node->fullname)),
-    '#weight' => $w++,
+    '#weight' => 1,
   );
 
   $node->content['group3'] = array(
Index: stormproject/stormproject.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormproject/stormproject.module,v
retrieving revision 1.8.4.57
diff -u -p -r1.8.4.57 stormproject.module
--- stormproject/stormproject.module	19 Jan 2010 18:27:29 -0000	1.8.4.57
+++ stormproject/stormproject.module	17 Jul 2010 14:04:36 -0000
@@ -341,7 +341,7 @@ function stormproject_form(&$node) {
   $organizations = array();
   while ($organization = db_fetch_object($r)) {
     $organizations[$organization->nid] = $organization->title;
-    if (!$node->organization_nid) $node->organization_nid = $organization->nid;
+    if (!isset($node->organization_nid)) $node->organization_nid = $organization->nid;
   }
   $form['group1']['organization_nid'] = array(
     '#type' => 'select',
@@ -444,7 +444,7 @@ function stormproject_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('Duration'),
     '#size' => 20,
-    '#default_value' => $node->duration,
+    '#default_value' => !isset($node->duration) ? null : $node->duration,
   );
 
   $form['group4'] = array(
@@ -465,7 +465,7 @@ function stormproject_form(&$node) {
     '#title' => t('Price'),
     '#type' => 'textfield',
     '#size' => 15,
-    '#default_value' => $node->price,
+    '#default_value' => !isset($node->price) ? null : $node->price,
   );
 
   $currency_list = stormattribute_attributes_bydomain('Currency');
@@ -499,7 +499,7 @@ function stormproject_form(&$node) {
     '#type' => module_exists('stormperson') ? 'select' : 'hidden',
     '#title' => t('Project Manager'),
     '#options' => $options,
-    '#default_value' => $node->manager_nid,
+    '#default_value' => !isset($node->manager_nid) ? null : $node->manager_nid,
   );
   
   if (module_exists('stormteam')) {
@@ -519,7 +519,7 @@ function stormproject_form(&$node) {
     '#type' => module_exists('stormperson') ? 'select' : 'hidden',
     '#title' => t('Assigned to'),
     '#options' => $options,
-    '#default_value' => $node->assigned_nid,
+    '#default_value' => !isset($node->assigned_nid) ? null : $node->assigned_nid,
   );
   
   if ($type->has_body) {
@@ -528,7 +528,7 @@ function stormproject_form(&$node) {
 
   $form['title_old'] = array(
     '#type' => 'hidden',
-    '#default_value' => $node->title_old,
+    '#default_value' => !isset($node->title_old) ? null : $node->title_old,
   );
 
   return $form;
@@ -622,7 +622,7 @@ function _stormproject_beforesave(&$node
 function stormproject_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
     case 'prepare':
-      if(!$node->nid) {
+      if(!isset($node->nid)) {
         $category_list = stormattribute_attributes_bydomain('Project category');
         $node->projectcategory = $category_list['default'];
 
