- Issue created by @arif.zisu
- 🇮🇳India arif.zisu Kolkata
diff --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
- Merge request !1Deprecated function: Automatic conversion of false to array is deprecated → (Open) created by arif.zisu
- last update
10 months ago PHPLint Failed - Status changed to Needs review
10 months ago 8:58am 5 February 2024 - 🇧🇾Belarus alena_stanul
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:
function _variable_options($options = array()) { $options = ($options !=FALSE) ? $options : []; if (!empty($options['language'])) {...
Thanks
- 🇮🇳India arif.zisu Kolkata
@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 ??