If you get the error message "Fatal error: Call to undefined function db_fetch_object() [...] config_perms.module on line 155" navigate to config_perms.module in modules/Docc-config_perms-04298e5, delete the following while-loop in line 155

while ($perm = db_fetch_object($result)) {
$perm->path = unserialize($perm->path);
$perms[$perm->machine_name] = $perm;
}

and replace it with

foreach ($result as $perm) {
$perm->path = unserialize($perm->path);
$perms[$perm->machine_name] = $perm;
}

The error occurs due to the removed db_fetch_object() method in D7.

Comments

BenK’s picture

@pschmitz: Thanks for the suggested fix... I plan to try out this module in D7 using the github code. Does the D7 version basically work or is it still pretty unusable?

--Ben

Docc’s picture

The module works and is usable. Just have to found the time to push it to Drupal and make a stable release

Docc’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Needs work » Fixed

Fix has been commited.

Status: Fixed » Closed (fixed)

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

Jesuscares’s picture

I am getting the error:
Fatal error: Call to undefined function db_fetch_object() in /home/foobarsite/public_html/sites/all/modules/autologout/autologout.module on line 562

I am not getting the error you speak of here about "config_perms.module" [I don't know how to find this "config_perms.module" you are speaking of, nor where it would be found.]

This error that I'm receiving is in the autologout module.

The code in the autologout module on line 562 is as follows:

while ($row = db_fetch_object($result)) {
$user_settings[$row->uid] = $row->setting;
}

Any help would be appreciated. Thanks!

Jesuscares’s picture

Oh, I see another issue listed at http://drupal.org/node/1034288#comment-5037292 but can't get that to fix it either.