- Issue created by @mmatsoo
After upgrading a project to Drupal 11.2, clicking the "View more" button on our views resulted in the js console reporting a server side 500 error.
Argument #1 ($elements) must be of type array, null given
I tracked it down to src/EventSubscriber/ShowMoreEventSubscriber.php. The change I made was to use the null coalescing operator in two places. One example for illustrative purposes is shown below. (See attached patch for actual changes.)
// This is the original line.
$footer_render = $footer->render();
// This is the fix I added.
$footer_render = $footer->render() ?? [];
Needs review
2.0
Code