Skip to content

Commit

Permalink
Fixed undefined array key
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 21, 2024
1 parent b88d5b6 commit 93394bb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/stanford_decoupled/stanford_decoupled.module
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 93394bb

Please sign in to comment.