Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Fixes a problem during indexing missing posts when custom posts are not actually posts.

## [2.0.11] - 2024-09-06

### Fixed
Expand Down
8 changes: 7 additions & 1 deletion src/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ function get_post( $post_id ) {

$index = Settings::get( 'posts_index' );

$doc_id = PostIndex::get_document_id( \get_post( $post_id ), $post_id );
$post = \get_post( $post_id );

if ( empty( $post ) ) {
return null;
}

$doc_id = PostIndex::get_document_id( $post, $post_id );

$result = $client->raw_command( 'HGETALL', [ $index . ':' . $doc_id ] );

Expand Down