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

Post Content & Excerpt are not copy. #1

Closed
YChWork opened this issue Jan 17, 2018 · 1 comment
Closed

Post Content & Excerpt are not copy. #1

YChWork opened this issue Jan 17, 2018 · 1 comment

Comments

@YChWork
Copy link

YChWork commented Jan 17, 2018

HI

I found an issue, where the post content & excerpt are not copy over when i duplicate the post.
After debugged the code and notice that, this is because of the strict comparison issue.
intval( get_option( 'duplicate_post_copycontent' ) ) === '1'
As you can see above code, since it's using a strict comparison it should be int instead of string.
File : duplicate-post-admin.php
There are a few of the same issue related to that.

Thank you.

@enricobattocchi
Copy link
Member

Thanks! Still haven't found the time to test extensively the code after refactoring.

jrfnl added a commit that referenced this issue Sep 29, 2021
This bug was exposed by PHP 8.1.

The `Check_Changes_Handler::check_changes_action_handler()` expects a global `$wp_version` variable to be available, but this variable was not created for the test, leading to a "Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated" deprecation notices in PHP 8.1.

Fixed by improving the test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants