I'm seeing this error in the server log:

PHP Fatal error:  Call to undefined function arg() in /Library/WebServer/drupal/modules/firestats/firestats.module on line 111

The offending function in the module is:

  if((arg(0) == 'admin' && variable_get('firestats_admin_disable', 0)) || $udf || $rdf_status) {
    return;
  }
  elseif ($file_exists = file_exists(FS_INSTALL_PATH)) {
    require_once(FS_INSTALL_PATH);
    fs_add_hit(null,true);
    return;
  }
}

Which is the one to disable hit counting for the admin user.

This is entropy PHP 5.2.2 on OS X 10.4.9/Apache 1.3.33 with Firestats 1.2.4-stable (standalone).

Any ideas as to the cause? Solution?

Comments

mirkba’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

I have a similar problem with the 5.x-1.x-dev-Version of the Firestats-Modul:
I get the following error message directly in the browser, when I call a site the second time:

Fatal error: Call to undefined function arg() in /.../modules/firestats/firestats.module on line 137

line 137 is:

if((arg(0) == 'admin' && variable_get('firestats_admin_disable', 0)) || $udf || $rdf_status) {
return;
}

But this behavior only appears in opera and internet explorer. with firefox or safari everything looks fine.

what's the problem here? any ideas?

Gurpartap Singh’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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