Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMPB-1509 correct typo in find_and_update_post() to properly compare post slug and link url when updating IDX pages #492

Open
wants to merge 1 commit into
base: release/3.2.0-old2
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions idx/idx-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ public function find_and_update_post( $link, $name, $posts ) {
$matchingPostWithName = null;
foreach ( $matchingPosts as $matchingPost ) {
// It's possible for a post to already have the expected post name (slug), if we find one with this characteristic it should be kept over others
$nameMatches = $matchingPost->name == $link->url;
$nameMatches = $matchingPost->post_name == $link->url;
if ($nameMatches) {
error_log("impress find_and_update_post found a matching post for $link, $name: " . $matchingPost->ID);
error_log("impress find_and_update_post found a matching post for $link->url, $name: " . $matchingPost->ID);
$matchingPostWithName = $matchingPost;
}
}
Expand Down