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);
?>| Comment | File | Size | Author |
|---|---|---|---|
| #2 | incorrect_variable_get_value-2432801-2.patch | 554 bytes | makbul_khan8 |
Comments
Comment #1
makbul_khan8 commentedComment #2
makbul_khan8 commentedHi 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
Comment #3
guy_schneerson commentedThanks makbul_khan8, looks good to me
Comment #4
makbul_khan8 commentedComment #5
Chris CharltonPatch ready to go in.
Comment #6
avpadernoThe user who wrote the patch should not change the status to RTBC.
Comment #7
avpadernoYes, 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 tovariable_get_value()the options it receives.Comment #8
avpaderno