When assigning a paper to a reviewer, i get the following warning message.

warning: Missing argument 2 for variable_get() in /home/blatter1/public_html/drupal/includes/bootstrap.inc on line 369.

please advise. Thanks

Comments

mfh’s picture

googling for variable_get there are a lot of links for the "missing 2nd arg" error.
I suppose this is a problem of (obsolete?) drupal version, not of the conference module.

I just checked on http://cvs.drupal.org/viewcvs/drupal/contributions/modules/conference/co...
that all calls to var_get() in conf.5.1 do have 2 args conforming to
http://api.drupal.org/api/HEAD/function/variable_get

Are you sure you use conf. 5.1 with drupal 5.1 ?
I'm tempted to close this issue, unless you confirm.
Thanks in advance.

kjdcruz’s picture

Have confirmed that I am using drupal 5.1;

The Conference module is 5.x-1.x-dev.

shane birley’s picture

I am able to confirm this error is happening. I installed the conference module today on a new Drupal 5.1 installation and have set up the site as per the instructions and received this error when assigning a paper.

warning: Missing argument 2 for variable_get() in /htdocs/drupal_5x_prd_01/includes/bootstrap.inc on line 369.
shane birley’s picture

Installed on:

- Drupal 5.1
- Conference 5.x-1.x-dev

This is a completely new installation specifically created to test the functionality of the conference module.

shane birley’s picture

I can confirm the e-mail is sent out and the assignment of reviewers to papers appears to be functional regardless of the error.

shane birley’s picture

This error is repeated when papers are either rejected or accepted.

warning: Missing argument 2 for variable_get() in /htdocs/drupal_5x_prd_01/includes/bootstrap.inc on line 369.
shane birley’s picture

And, again, the e-mails are sent out to the paper owner successfully.

shane birley’s picture

I did some checking into other variable_get() errors and I am thinking this comment may be correct in its assumption:

$from = variable_get('conference_name', variable_get('site_name', '')) // should this be enclosed in quotes ?

References:

http://drupal.org/node/31792

But, then again, maybe not. Just trying to help.

mfh’s picture

thanks for your contributions to this issue.
I cannot see why it gives an error since in all calls to varaible_get there IS a second argument, even if it's the number zero or the empty string.

the only possibility I see : in 3 instances,
(line 625 and line 1874 and the following one, referring to http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/conference/...
)
the second argument is itself a call to variable_get()
and maybe, since the latter has as second arg. '', this might be transformed into PHP "NULL" value
and then "disappear" and give the error in the first get_var() call.

OR, more probably, this empty string becomes 'NULL' when it is stored into the MySQL base.

I think the second occurance could match the place you get the error (sending e-mail).
as for now, I suggest as a "intermediate bug fix" to prepend a @ to the outer get_var() in the second (or both) instances.

this is not satisfactory, but I cannot really spot a true error in the script.

Oh, b.t.w., the "should this be enclosed in quotes" comment does not refer to the function calls
but to the format of the sender e-mail address :

Firstname Name < email > is ok,
"Firstname Name" < email > is maybe better,
especially if there's " middle initial. " after firstname
but on the other hand, if instead there's a quote in the "name"
(since Firstname Name is in fact the conference name, which might well contain something "quoted" inside)
then i suppose putting quotes would give an error....

mfh’s picture

Assigned: Unassigned » mfh
Status: Active » Fixed

D'OH !
just a few lines further (L.1881), there WAS a get_var() w/o 2nd arg.

its now fixed - you can download the corrected version at
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/conference/...

thanks again for your patience....

shane birley’s picture

Status: Fixed » Closed (fixed)

Brilliant! I have updated and will confirm the error has been corrected. You are awesome!