wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Options_Helper::validate_social_url(): bug fix

Open jrfnl opened this issue 3 years ago • 0 comments

Context

  • Bugfix for social URL validation

Summary

This PR can be summarized in the following changelog entry:

  • Bugfix for social URL validation

Relevant technical choices:

As things were, the function would only ever return a boolean value, not the return value of WPSEO_Option_Social::get_instance()->validate_social_url( $url ) as that return value would be converted to a boolean for the || condition.

I believe the fix I've now applied represents the intended behaviour of the function.

@leonidasmi Would you mind adding the test instructions ? I believe you are more familiar with this code.

Would also be good if this code was actually tested via the automated testsuites as tests should have caught this issue earlier.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • ???

Relevant test scenarios

  • [ ] Changes should be tested with the browser console open
  • [ ] Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • [ ] Changes should be tested on different editors (Block/Classic/Elementor/other)
  • [ ] Changes should be tested on different browsers
  • [ ] Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • [ ] QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • [ ] This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • [ ] This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • [ ] I have written documentation for this change.

Quality assurance

  • [ ] I have tested this code to the best of my abilities
  • [ ] I have added unit tests to verify the code works as intended
  • [ ] If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • [ ] I have written this PR in accordance with my team's definition of done.

Fixes #

jrfnl avatar Aug 06 '22 01:08 jrfnl