Skip to content

Commit

Permalink
[Backport v12-branch] Improved handling for undefined keys.
Browse files Browse the repository at this point in the history
Merge pull request #427 from humanmade/backport-425-to-v12-branch
  • Loading branch information
Robin Devitt authored Sep 19, 2022
2 parents 56da126 + 0a6d45a commit 922f6b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/ui/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ 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 early if set and page aren't set.
if ( ! isset( $_GET['set'] ) && ! isset( $_GET['page'] ) ) {
return apply_filters( 'altis.documentation.current.set', $default );
}

Expand Down

0 comments on commit 922f6b1

Please sign in to comment.