Problem/Motivation
After upgrading from Drupal 8.6.15 to 8.7.0, I'm unable to open the media library. I've applied all updates and cleared the caches thoroughly.
Steps to reproduce:
* create a new content type (mine is named "test")
* create a new entityreference field to "Media" entities (enabled the "image" bundle)
* create a new node
* click "Add media"
Expected behaviour: media library pops up like in 8.6.15
Actual behaviour: nothing happens, the POST to /node/add/test?ajax_form=1 returns a 500
And the following error is logged during the POST AJAX request:
TypeError: Argument 2 passed to Drupal\media_library\MediaLibraryState::create() must be of the type array, null given, called in /var/www/drupalvm/drupal/web/core/modules/media_library/src/MediaLibraryState.php on line 98 in Drupal\media_library\MediaLibraryState::create() (line 67 of /var/www/drupalvm/drupal/web/core/modules/media_library/src/MediaLibraryState.php)
#0 /var/www/drupalvm/drupal/web/core/modules/media_library/src/MediaLibraryState.php(98): Drupal\media_library\MediaLibraryState::create(NULL, NULL, NULL, NULL)
#1 /var/www/drupalvm/drupal/web/core/modules/media_library/media_library.module(73): Drupal\media_library\MediaLibraryState::fromRequest(Object(Symfony\Component\HttpFoundation\Request))
#2 [internal function]: media_library_views_post_render(Object(Drupal\views\ViewExecutable), Array, Object(Drupal\views\Plugin\views\cache\Tag))
#3 /var/www/drupalvm/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('media_library_v...', Array)
#4 /var/www/drupalvm/drupal/web/core/modules/views/src/ViewExecutable.php(1540): Drupal\Core\Extension\ModuleHandler->invokeAll('views_post_rend...', Array)
#5 /var/www/drupalvm/drupal/web/core/modules/views/src/Plugin/views/display/Page.php(183): Drupal\views\ViewExecutable->render()