diff --git a/booking.email_manually.inc b/booking.email_manually.inc index 8f7dd2a..994a35e 100644 --- a/booking.email_manually.inc +++ b/booking.email_manually.inc @@ -424,10 +424,10 @@ function booking_manual_email_form_submit($form, &$form_state) { $attachment = NULL; $update_messages = array(); $checkboxes = $form_state['values']['table']; //$values['booking_price_active']; - watchdog('booking', 'Formstate when setting buttons: @info', array ('@info' => var_export($form_state['values'], TRUE))); + //watchdog('booking', 'Formstate when setting buttons: @info', array ('@info' => var_export($form_state['values'], TRUE))); //watchdog('booking', 'Checkboxes when setting buttons: @info', array ('@info' => var_export($checkboxes, TRUE))); - if (isset($form_state['values']['booking-email-attachment'])) { + if (isset($form_state['values']['booking-email-attachment']) && $form_state['values']['booking-email-attachment'] != 0) { $attachment = file_load($form_state['values']['booking-email-attachment']); watchdog('booking_debug', 'File attachment detected: @info', array ('@info' => print_r($attachment, TRUE))); // NOTE: Since we do nothing to save this file, it should get cleaned up by cron