Common.inc throws an error when trying to use any function that contains a call to variable_get():

Fatal error: Call to undefined function: variable_get() in /drupal/includes/common.inc on line 1251

variable_get() has recently been moved bootstrap.inc.

CommentFileSizeAuthor
junyor.patch556 bytesjunyor

Comments

gábor hojtsy’s picture

bootstrap.inc is included in index.php as needed... You must have a special case... What is that?

junyor’s picture

Using the devel.module, when I was trying to test generate-users.php and update-teaser.php.

killes@www.drop.org’s picture

Assigned: Unassigned » killes@www.drop.org

The proper fix is of course to include bootstrap.inc from generate-user.php. I've changed this yersterday.

junyor’s picture

*sigh* I thought I had tried that first. Thanks. :)

gatezone’s picture

CVS (downloaded today 3/10/04) Drupal upgrade to working 4.3.2 no extra modules enabled yet.

Search on error showed this project issue to be most recent.

Upgrade went fine, when I go to configure link I get the following error above the header.

warning: Invalid argument supplied for foreach() in /home/virtual/site10/fst/var/www/html/main/includes/common.inc on line 1094.

common.inc lines 1091-1096:

function drupal_attributes($attributes = array()) {
if (count($attributes)) {
$t = array();
foreach ($attributes as $key => $value) {
$t[] = "$key=\"$value\"";
}

Any help appreciated...

killes@www.drop.org’s picture

dupe of 6345

junyor’s picture

The fix works as it should, thanks!