- Status changed to RTBC
12 months ago 12:56pm 18 November 2023 - 🇬🇧United Kingdom stevewilson
I too was seeing this issue. The patch referenced at #5 works for me so marking as RTBC.
I get this error when certain VBO rules are run.
[PHP 8.0] Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _views_bulk_operations_rules_get_field() (line 278 of views_bulk_operations.rules.inc)
The $args
variable is NULL. Here's a rules config. After saving a taxonomy term of a certain bundle, it loops through them all to ensure only one of them has a certain boolean field checked.
function my_module_features_default_rules_configuration() {
$items = array();
$items['rules_set_single_term'] = entity_import('rules_config', '{ "rules_set_single_term" : {
"LABEL" : "Set single term",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "views_bulk_operations", "taxonomy" ],
"ON" : {
"taxonomy_term_update--my_terms" : { "bundle" : "my_terms" },
"taxonomy_term_insert--my_terms" : { "bundle" : "my_terms" }
},
"IF" : [ { "data_is" : { "data" : [ "term:field-boolean" ], "value" : "1" } } ],
"DO" : [
{ "views_bulk_operations_action_load_list" : {
"USING" : { "view" : "my_terms|attachment_1", "args" : [ "" ] },
"PROVIDE" : { "entity_list" : { "my_terms_terms" : "My Terms Terms" } }
}
},
{ "LOOP" : {
"USING" : { "list" : [ "my-term-terms" ] },
"ITEM" : { "my_term_term" : "My Term Term" },
"DO" : [
{ "component_unset_my_term_field" : {
"designated_term" : [ "term" ],
"other_term" : [ "my-term-term" ]
}
}
]
}
}
]
}
}');
return $items;
}
Change the line to
$args = ($args === NULL) ? '' : $args;
$view_arguments = explode("\n", $args);
Which maintains compatibility with PHP < 8
3.0
Core
The issue particularly affects sites running on PHP version 8.0.0 or later.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I too was seeing this issue. The patch referenced at #5 works for me so marking as RTBC.