Not an actual bug, as this did not cause any issues (not yet anyway) but I noticed the following call to variable_get_value()

<?php
function variable_set_value($name, $value, $options = array()) {
  $old_value = variable_get_value($name, NULL, $options);
?>

and the function variable_get_value() only takes two parameters:

<?php
function variable_get_value($variable, $options = array()) {
?>

so looks like the call should be:

<?php
function variable_set_value($name, $value, $options = array()) {
  $old_value = variable_get_value($name, $options);
?>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

makbul_khan8’s picture

Assigned: Unassigned » makbul_khan8
makbul_khan8’s picture

Assigned: makbul_khan8 » Unassigned
Status: Active » Needs review
FileSize
554 bytes

Hi guy_schneerson,

Yes you are correct, even I have not seen any usage or call for the function variable_get_value with 3 parameters.
I have created patch for same.

Thanks

guy_schneerson’s picture

Thanks makbul_khan8, looks good to me

makbul_khan8’s picture

Status: Needs review » Reviewed & tested by the community
Chris Charlton’s picture

Patch ready to go in.

apaderno’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: -Incorect call to variable_get_value() function

The user who wrote the patch should not change the status to RTBC.

apaderno’s picture

Priority: Minor » Normal

Yes, that is the only wrong call to variable_get_value().
I don't think it's a minor bug, since variable_set_value() is not passing to variable_get_value() the options it receives.

apaderno’s picture

Status: Needs review » Reviewed & tested by the community