File background_batch.pages.inc
Function _background_batch_page()

This code should be executed on Drupal 6, because there is not defined $batch['batch_altered'].

  // Manually call our alter if hook_batch_alter() is unsupported on this system.
  if (empty($batch['batch_altered'])) {
    background_batch_batch_alter($batch);
    // Save batch to DB.
    _batch_shutdown();
  }

BUT... if module Better Batch is enabled, it backports hook_batch_alter() and $batch['batch_altered'] is defined.

My solution

  if (DRUPAL_CORE_COMPATIBILITY == '6.x') {

Comments

Xperd’s picture

Project: Background Batch » Background Process
Version: » 6.x-1.13
gielfeldt’s picture

I'm not sure I understand the problem. If Better Batch is installed the alter function is called and $batch['batch_altered'] is set. And then we don't want to call it a second time.

gielfeldt’s picture

Status: Active » Postponed (maintainer needs more info)