From 93394bb00bd5c72fcb8ca4d20648d3bb13cadb70 Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Thu, 21 Nov 2024 10:21:25 -0800 Subject: [PATCH] Fixed undefined array key --- modules/stanford_decoupled/stanford_decoupled.module | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/stanford_decoupled/stanford_decoupled.module b/modules/stanford_decoupled/stanford_decoupled.module index e4b906cf..ce12c4d0 100644 --- a/modules/stanford_decoupled/stanford_decoupled.module +++ b/modules/stanford_decoupled/stanford_decoupled.module @@ -340,11 +340,13 @@ function stanford_decoupled_next_site_preview_alter(array &$preview, array $cont $url = $preview['toolbar']['links']['#links']['live_link']['url']; $options = $url->getOptions(); // No need for all the other parameters. - $options['query'] = [ - 'slug' => $options['query']['slug'], - 'secret' => $options['query']['secret'], - ]; - $url->setOptions($options); + if (isset($options['query']['slug'])) { + $options['query'] = [ + 'slug' => $options['query']['slug'], + 'secret' => $options['query']['secret'], + ]; + $url->setOptions($options); + } } }