Closed (fixed)
Project:
Domain
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2010 at 03:37 UTC
Updated:
14 Mar 2010 at 23:50 UTC
Jump to comment: Most recent file
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;
}
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 723858-scalar.patch | 638 bytes | agentrickard |
| #6 | 723858-scalar.patch | 1.12 KB | agentrickard |
Comments
Comment #1
nonsieSeems like a duplicate of #579552: php errors in watchdog , #660254: Cannot use a scalar value as an array , #443346: E_ALL: Cannot use a scalar value as an array in domain/domain.bootstrap.inc on line 55
What version of PHP/MySQL are you running? Is your cron running properly?
Comment #2
fizk commentedCron is running well. I'm runningPHP 5.2.12 and 5.0.89-community MySQL Community Edition
Comment #3
agentrickardYou 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 ?
Comment #4
fizk commentedI only run cron from the browser, so #723262: Abort bootstrap if HTTP_HOST not set couldn't be the problem.
Comment #5
agentrickardThen 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:
We would have to do the same on line 52.
Comment #6
agentrickardHere's a patch to test.
Comment #7
agentrickardAnd a simpler solution! Committed!