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

Fix an an undefined variable issue #578

Merged
merged 1 commit into from
Apr 27, 2020
Merged

Fix an an undefined variable issue #578

merged 1 commit into from
Apr 27, 2020

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Apr 20, 2020

Description of the Change

In #574, we removed a try/catch block in order to fix an issue where distribution didn't fully work and the post ID value is 0, instead of undefined. But within that try/catch block, we were setting a $remote_id variable that is then used twice after that.

Because that code was removed, that variable then becomes undefined when it is referenced later, causing issues. Items will still distribute correctly but the connection will not be fully set up, so updates will not be pushed through.

This PR fixes this issue.

Alternate Designs

None

Benefits

Fixes undefined variable PHP errors and ensures connections are set up properly.

Possible Drawbacks

None

Verification Process

  1. Prior to this change, distribute a post to an external connection
  2. Notice that the post was distributed successfully.
  3. Try updating the post that was distributed
  4. Notice updates were not pushed through
  5. Check out this PR and run the same test, ensuring that updates happen now

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @dkotter!

@jeffpaul jeffpaul added this to the 1.6.0 milestone Apr 21, 2020
@helen helen merged commit b3eb3dc into develop Apr 27, 2020
@jeffpaul jeffpaul deleted the fix/undefined-var branch June 30, 2020 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants