diff --git a/inc/relationship/admin-filter.php b/inc/relationship/admin-filter.php index 8edc48a..b017490 100644 --- a/inc/relationship/admin-filter.php +++ b/inc/relationship/admin-filter.php @@ -204,7 +204,10 @@ private function get_selected_item( string $relationship_id, string $object_type return []; } - $id = Arr::get( $_GET, "relationships.{$relationship_id}.ID" ); + $id = (int) Arr::get( $_GET, "relationships.{$relationship_id}.ID" ); + if ( empty( $id ) ) { + return []; + } if ( $object_type === 'term' ) { $term = get_term( $id );