Skip to content

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