Skip to content

Commit

Permalink
[Backport v12-branch] Fix undefined array key "page".
Browse files Browse the repository at this point in the history
Merge pull request #424 from humanmade/backport-422-to-v12-branch
  • Loading branch information
Robin Devitt authored Sep 9, 2022
2 parents 4005ed6 + 63e8583 commit 56da126
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/ui/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ function get_current_set_id() : string {
$sets = Documentation\get_documentation_sets();
$default = array_keys( $sets )[0] ?? '';

// return early if page is not set.
if ( ! isset( $_GET['page'] ) ) {
return apply_filters( 'altis.documentation.current.set', $default );
}

/**
* Filter the current set ID.
*
Expand Down

0 comments on commit 56da126

Please sign in to comment.