In /var/log/php.error.log:

PHP Warning: Cannot use a scalar value as an array in /var/www/drupal/sites/all/modules/domain/domain.bootstrap.inc on line 58

/**
 * Domain module bootstrap: calls all bootstrap phases.
 */
function domain_bootstrap() {
  global $_domain;
  // Initialize our global variable.
  $_domain = array();

  $phases = array(DOMAIN_BOOTSTRAP_INIT, DOMAIN_BOOTSTRAP_NAME_RESOLVE, DOMAIN_BOOTSTRAP_FULL);
  foreach ($phases as $phase) {
    // We return NULL if the domain module is not enabled.  This prevents
    // load errors during module enable / disable.
    $error = _domain_bootstrap($phase);
    if ($error === NULL) {
      $_domain['error'] = -1;
      break;
    }
    else if ($error === FALSE) {
      // watchdog() is not available here, and there may be other logging.
      // So we have to write an error message global variable and pick them up in settings,inc.
      $_domain['error'] = $phase;       <====  Line 58
      break;
    }
  }
}

Comments

nonsie’s picture

Status: Active » Postponed (maintainer needs more info)
fizk’s picture

Cron is running well. I'm runningPHP 5.2.12 and 5.0.89-community MySQL Community Edition

agentrickard’s picture

You can also test #723262: Abort bootstrap if HTTP_HOST not set.

"Running well" is not an answer. Is cron configured as specified here: http://drupal.org/cron ?

fizk’s picture

I only run cron from the browser, so #723262: Abort bootstrap if HTTP_HOST not set couldn't be the problem.

agentrickard’s picture

Then you may have a misconfiguration somewhere, because this would mean that the domain lookup is returning 0 (not found).

This should fix the error message, but not the root cause:

   if (is_array($_domain)) ? $_domain['error'] = $phase : $_domain = array('error' => $phase);

We would have to do the same on line 52.

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.12 KB

Here's a patch to test.

agentrickard’s picture

Status: Needs review » Fixed
StatusFileSize
new638 bytes

And a simpler solution! Committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.