I always get this error message when I enable the module:

warning: Missing argument 2 for variable_get(), called in /var/www/drupal-5.1/modules/profile_enforcer/profile_enforcer.module on line 112 and defined in /var/www/drupal-5.1/includes/bootstrap.inc on line 369.

I actually get this 7 times on my administer blocks page, from lines 112, 117, 124, 135, 138, 144, and 165 of the profile_enforcer.module file. I am running Drupal 5.1, MySQL 5.0.38, PHP 5.2.1, and Apache 2.2.3 on a Ubuntu Feisty box.

Comments

suydam’s picture

Fixed with 1.1 release.

suydam’s picture

Status: Active » Closed (fixed)
jared_c’s picture

Version: 5.x-1.0 » 5.x-1.1
Status: Closed (fixed) » Active

Wow, you're quick.

I installed the new release, and it fixed the error for all the lines that I listed. Slick as a whistle. Problem is, the same error now shows up from line 237. Here's the full text:

warning: Missing argument 2 for variable_get(), called in /var/www/drupal-5.1/modules/profile_enforcer/profile_enforcer.module on line 237 and defined in /var/www/drupal-5.1/includes/bootstrap.inc on line 369.

Same text, different line number. Sometimes I see this error with line number 233 (from the module file) listed as well.

I also get another error, this one a little more critical. When in debug mode I see this error:

Profile Enforcer Debuggin: Requried information (profile) is not complete. Redir would go to user/1/edit (but we're in debugging mode). You are here: drupal-5.1/?q=admin/build/block

The profile enforcer block lists:

PROFILE ENFORCER (DEBUGGING)
PROFILE IS BOUncING YOU
PROFILE IS COMPLETE!
LOCATION INFO IS COMPLETE!

If I take it off of debugging, it really does redirect me to the edit page, even though all required fields in my profile are filled.

My profile has six required fields: the default Username and email address fields, listed under account information; and four more fields under "Personal Information" which I added with the Profile module. There are no optional fields in the profile.

Again, thanks for the quick response last time.

Jared

jared_c’s picture

By the way, I installed the dev version and the whole "variable_get()" issue goes away, but it still redirects users with all required fields filled in. Exact same behavior as I described above. It also catches the users that haven't filled in all fields, so that still works.

Jared

Anonymous’s picture

Using version 5.x-1.1, I get the "Missing argument 2 for variable_get()" error message.

Looking at the code, I notice that the prbouncer function has calls to variable_get that have only one parameter.

Side note: I set it to require location, hoping that it would only require the required fields, but it required all the fields to be filled in. I guess that's as intended, and I should be able to use the 'Other Fields' entry. Just a little confusing, documentation should cover it.

Anonymous’s picture

OK, adding second parameters in lines 229 [,''], 233[,''], and 237[,0] seems to have fixed it.

Also, the requirement stuff seems to behave as I expected now.

suydam’s picture

Assigned: Unassigned » suydam
Status: Active » Fixed

Fixed in latest release.

Anonymous’s picture

Status: Fixed » Closed (fixed)