Index: bookingsapi.forms.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bookingsapi/bookingsapi.forms.inc,v
retrieving revision 1.14
diff -u -p -r1.14 bookingsapi.forms.inc
--- bookingsapi.forms.inc	7 Apr 2009 14:26:44 -0000	1.14
+++ bookingsapi.forms.inc	12 May 2009 14:08:30 -0000
@@ -292,31 +292,31 @@ function bookingsapi_resource_form($reso
   );
   $form['basic']['resource_id'] = array(
     '#type' => 'value',
-    '#value' => $resource['resource_id'],
+    '#value' => array_key_exists('resource_id',$resource)?$resource['resource_id'],
   );
   $form['basic']['name'] = array(
     '#title' => t('Resource name'),
     '#type' => 'textfield',
     '#description' => t('Such as \'Room 312\' or \'Computer #31\'.'),
-    '#default_value' => $resource['name'],
+    '#default_value' => array_key_exists('name',$resource)?$resource['name']:'',
   );
   $form['basic']['location'] = array(
     '#title' => t('Resource location'),
     '#type' => 'textfield',
     '#description' => t('Such as \'3rd floor\' or \'Lab X350\'.'),
-    '#default_value' => $resource['location'],
+    '#default_value' => array_key_exists('location',$resource)?$resource['location']:'',
   );
   $form['basic']['description'] = array(
     '#title' => t('Resource description'),
     '#type' => 'textarea',
     '#description' => t('Any other information that describes the bookable resource.'),
-    '#default_value' => $resource['description'],
+    '#default_value' => array_key_exists('description',$resource)?$resource['description']:'',
   );
   $form['basic']['parent'] = array(
     '#type' => 'bookingsapi_resource_select',
     '#title' => t('Parent resource'),
     '#description' => t('If this resource has a parent, it will inherit all bookings and availabilities of the parent.'),
-    '#default_value' => $resource['parent'],
+    '#default_value' => array_key_exists('parent',$resource)?$resource['parent']:'',
   );
   $form['basic']['default_availability'] = array(
     '#title' => t('Default availability'),
@@ -330,7 +330,7 @@ function bookingsapi_resource_form($reso
     '#title' => t('Disable new bookings from being made'),
     '#type' => 'checkbox',
     '#description' => t('Existing bookings will be preserved.'),
-    '#default_value' => $resource['disabled'],
+    '#default_value' => array_key_exists('disabled',$resource)?$resource['disabled']:FALSE,
   );
   if(!empty($resource)) {
     $form['delete'] = array(
