Skip to content

Commit

Permalink
Added a safeguard for nonexistent array offset warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Feb 7, 2025
1 parent 3c6ee84 commit b73e035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/packages/search/src/class-template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function render_available_filters( $filters = null, $post_types =
}

foreach ( (array) $filters as $filter ) {
if ( 'post_type' === $filter['type'] ) {
if ( isset( $filter['type'] ) && 'post_type' === $filter['type'] ) {
self::render_filter( $filter, $post_types );
} else {
self::render_filter( $filter, $active_post_types );
Expand Down

0 comments on commit b73e035

Please sign in to comment.