There are situations on various browsers that if you hit the back button after a submit and then try to use a ahah enable form element you get very ugly array error messages.

These error message are obtuse are not helpful to the end user. The code should check to see if there are no arguments because the form is no longer valid.

After Line 131 ahah_helper_render() in ahah_helper.module I propose something like:

  if (empty($args)) {
      drupal_set_message('You may have hit the back button and the form is no longer valid.<br />Please refresh the page.', 'warning');
      $javascript = drupal_add_js(NULL, NULL, 'header');
      $settings = call_user_func_array('array_merge_recursive', $javascript['setting']);
      drupal_json(array(
          'status'   => FALSE,
          'data'     => theme('status_messages'),
          'settings' => array('ahah' => $settings['ahah']),
      ));
      return;
  }