Problem/Motivation
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm->viewsFormSubmit() (line 923 of modules/contrib/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php).
We get this error when on PHP 8.5.
Steps to reproduce
Drupal 11, PHP 8.5
Proposed resolution
In viewsFormSubmit() of the VBO bulk form, normalize the submitted bulk-input list by defaulting to an empty array and skipping NULL/empty values before using each item as an array key, preventing PHP 8.5’s ‘null as array offset’ deprecation while preserving selection behavior.
Issue fork views_bulk_operations-3587306
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
gashunk commentedComment #4
graber commentedA bulk form key with NULL value is strange and shouldn't ever be a case under normal circumstances (it's a form checkbox value). Please provide steps to reproduce the issue.
Comment #5
graber commentedI see this is an issue in latest PHPUnit actually.. Fixing it in #3589897: Code cleanup, service autowiring improvements., I'll credit you @gashunk, thanks!