Needs review
Project:
Variable
Version:
7.x-2.5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Jan 2024 at 07:07 UTC
Updated:
7 Feb 2024 at 04:39 UTC
Jump to comment: Most recent
Comments
Comment #2
arif.zisu commentedComment #3
arif.zisu commenteddiff --git a/docroot/sites/all/modules/contrib/variable/variable.module b/docroot/sites/all/modules/contrib/variable/variable.module
index 472bba70f..0cd2639f2 100644
--- a/docroot/sites/all/modules/contrib/variable/variable.module
+++ b/docroot/sites/all/modules/contrib/variable/variable.module
@@ -627,6 +627,7 @@ function _variable_language() {
* - language, Language object
*/
function _variable_options($options = array()) {
+ $options = [];
if (!empty($options['language'])) {
$options['langcode'] = $options['language']->language;
}
Fixed it
Comment #5
arif.zisu commentedComment #6
alena_stanul commented@arif.zisu I am not agree with patch, because if $options is not empty, then you will artificially reset it to empty array. May be better to use the following code:
Thanks
Comment #7
arif.zisu commented@alena_stanul,
$options value will not work for boolean or empty value right (as it should be always array)??
So better to set empty array right ?? $options should always array right ??