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

Sitemap: post__not_in requires a value to be an array #62

Merged

Conversation

marcinkrzeminski
Copy link
Contributor

@marcinkrzeminski marcinkrzeminski commented Oct 26, 2023

What

I was getting an error saying: array_map(): Argument #2 ($array) must be of type array, string given when I have defined IDs to be excluded from the sitemap.

How

Getting an array by exploding the string and using array_map with an absint (like it's done in other places in the plugin).

Checklist:

  • My code is tested to the best of my abilities.
  • My code follows the WordPress Coding Standards.
  • The changes in this PR have been noted in CHANGELOG.md

@justlevine
Copy link
Member

Thanks so much for this PR @marcinkrzeminski !

I've updated the PR to apply this fix to Sitemap terms as well.

Copy link
Member

@justlevine justlevine left a comment

Choose a reason for hiding this comment

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

WP 5.9 is failing because Rank Math v1.0.200+ no longer supports that version. Merging.

@justlevine justlevine merged commit 9a1f011 into AxeWP:develop Oct 28, 2023
17 of 20 checks passed
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.

2 participants