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 passing ID instead of id #323

Merged
merged 2 commits into from
Oct 16, 2024
Merged

fix passing ID instead of id #323

merged 2 commits into from
Oct 16, 2024

Conversation

kevinpapst
Copy link
Contributor

Depending on the PHP version the old code has different outcomes.
In my situation $post->id is always an empty string.

The correct field name is ID, see https://developer.wordpress.org/reference/classes/wp_post/

As you already use $post->ID in other places of the class, this fact is likely not new 😁

@benbalter benbalter merged commit 2229702 into benbalter:master Oct 16, 2024
1 of 4 checks passed
@benbalter
Copy link
Owner

Thanks for these fixes. While maintained, some of the code is 12+ years old at this point, and PHP and WordPress has changed a lot over that time.

@kevinpapst kevinpapst deleted the fix-id branch October 16, 2024 14:43
@kevinpapst
Copy link
Contributor Author

Yeah, I thought we fix it for the next person.
In the next few weeks more people will think about migrating their WP sites 😁

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