Whenever there is a form that needs to be filled in, I am not redirected and I get this error:

warning: Missing argument 2 for variable_get() in /biznetbook/includes/bootstrap.inc on line 412.

I am using all of the default options, except turning it on. Any ideas?

Comments

davidneedham’s picture

It looks like the problem is that the variable_get function must always have a variable. Here's what I got from another issue queue post:

"make sure you dont have any variable_get('something') anywhere and replace them with variable_get('something','') if you find them"

I'm not sure how to make a patch, but I think I found the bugs. Line 229, 233, and 237 all have this problem. I'll add ,0 and see if that makes a difference.

davidneedham’s picture

That seemed to make a difference. Here's the code I updated:

// this internal function handles the redirction for people who haven't filled in necessary information yet.
function prbouncer($req_info='profile', $dest_url='user' ) {
	// bounce them if they're not on an edit page.
	$current_url = preg_replace('/^\//','',$_SERVER['REQUEST_URI']);
	if ( $dest_url == $current_url ) {
		drupal_set_message( variable_get('profile_enforcer_profile_message',0) ,'error');
	}
	// if they're on ANY user page leave'em alone
	elseif ( preg_match('/user/',$current_url) ) {
		drupal_set_message( variable_get('profile_enforcer_profile_message',0) ,'error');
	}
	else {
		global $user;
		if ( variable_get('profile_enforcer_debugger',0) ) {
			drupal_set_message("Profile Enforcer Debuggin: Requried information ($req_info) is not complete.  Redir would go to $dest_url (but we're in debugging mode). You are here: $current_url",'error');
		}
		else {
			drupal_goto($dest_url);
			//drupal_set_message("Profile Enforcer Debuggin: Requried information ($req_info) is not complete.  Redir would go to $dest_url (but we're in debugging mode) You are here: $current_url",'error');
		}
	}
}
davidneedham’s picture

Assigned: Unassigned » davidneedham
Status: Active » Needs work
christefano’s picture

Status: Needs work » Closed (duplicate)

This is a duplicate of #213189.