You are here:
» Fatal Error: Call To Undefined Function Arg()
Fatal error: Call to undefined function arg()
This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
I get Fatal error: Call to undefined function arg() in my hook_init() in my custom module when checking for arg(1). This works well for authenticated user, but fails for logged out users. Any help?
Created by programmer

1 year 41 weeks ago
Tags:
Try disabling cache and/or in your custom code check for arg() function as follows:
<?phpif (function_exists('arg') && arg(0) == 'node' && (is_numeric(arg(1)) || is_numeric(arg(2)))) {
?>
Post Comment