Repository navigation
Conversation
Adds a regression test for the fix in this branch: giving a sticky post a
password through edit_post() must unstick it even when the caller sends no
explicit `visibility`, which is what Quick Edit does.
Fails on trunk ("A password protected post was left sticky when no explicit
visibility was sent."), passes with the fix in this branch.
tests/phpunit/tests/admin/includesPost.php had no coverage of the
visibility/sticky/password interaction at all.
See #64810.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Closing this and moving it to the upstream repo, where it is actually visible: WordPress#11180 (comment). Same patch, unchanged. A PR into a fork branch only reaches you, and this test is what @wildworks asked for on #64810 before it can move, so it needs to sit where a committer will find it. Take it into |
…t is not set.
This resolves an error if `mysqli_num_fields()` is called before a successful SELECT-type query is performed:
{{{
mysqli_num_fields(): Argument #1 ($result) must be of type mysqli_result, false given
}}}
Developed in WordPress#13099.
Follow-up to r21472.
Props joehorntw, akshat2802, mukesh27, rejaulalomkhan, SergeyBiryukov.
Fixes #64130.
git-svn-id: https://develop.svn.wordpress.org/trunk@64458 602fd350-edb4-49c9-b593-d223f7449a82
Offering this as a commit into your branch rather than a competing patch, since @wildworks flagged #64810 as
needs-unit-testsin comment:6 and your PR is fix-only. Merge it here and it rides along with WordPress#11180 as one changeset — nothing else on your side changes.The test reproduces what Quick Edit actually posts:
stickybut novisibility. On trunkedit_post()never reachescase 'password', sounset( $post_data['sticky'] )never runs and the post stays sticky with a password set. With your fix the inferred visibility reaches that branch and the post is unstuck.tests/phpunit/tests/admin/includesPost.phphad no coverage of the visibility / sticky / password interaction at all.Verified locally:
A password protected post was left sticky when no explicit visibility was sent.OK (1 test, 3 assertions)test_post_exists_*tests, unrelated to either change.The fix is yours; I only wrote the test. If you'd rather squash it into your own commit, that's fine by me.