From 8ac9312b25ab19c13d2d45948c5e1144af65fc03 Mon Sep 17 00:00:00 2001 From: immaculatexavier <immaculate.x@3591395.no-reply.drupal.org> Date: Tue, 22 Nov 2022 17:38:07 +0000 Subject: [PATCH] Issue #3300969 by deulenko, phenaproxima: Passing null to parameter #1 ($haystack) of type string is deprecated --- lightning_media.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning_media.module b/lightning_media.module index 5e17bfc..b6ebf8a 100644 --- a/lightning_media.module +++ b/lightning_media.module @@ -384,7 +384,7 @@ function lightning_media_js_settings_alter(array &$settings) { } $route_name = \Drupal::routeMatch()->getRouteName(); - if (strpos($route_name, 'entity_browser') === 0 && isset($settings['ajaxPageState']['libraries'])) { + if ($route_name && strpos($route_name, 'entity_browser') === 0 && isset($settings['ajaxPageState']['libraries'])) { $libraries = explode(',', $settings['ajaxPageState']['libraries']); // If we pretend EB's iframe library has not been previously loaded, it will // ALWAYS be fetched from the server, preventing (in a crappy, kludgey way) -- GitLab