I have a situation where the global $post is not set.
relevanssi_index_doc fals back in using the $indexpost set by the save_post hook.
this value appear to be a integer, the post id, however the function checks $indepost with is_object.
if (!isset($post)) {
$post_was_null = true;
if (is_object($indexpost)) {
$post = $indexpost;
}
}
shouldn't this be a isset or is_int? There is a is_object to get the right post_id a few lines further down.
just curious: is there a reason to use the global $post as default instead of the post_id passed by the hooks? My two cents would be that the latter is the 'better' one.
(and thanks for the great plugin btw)