Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Commit b6a349d

Browse files
committed
Consider empty password strings as not being set
1 parent 58fd6b0 commit b6a349d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/endpoints/class-wp-rest-posts-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ protected function prepare_item_for_database( $request ) {
747747
}
748748

749749
// Post password.
750-
if ( isset( $request['password'] ) ) {
750+
if ( isset( $request['password'] ) && '' !== $request['password'] ) {
751751
$prepared_post->post_password = $request['password'];
752752

753753
if ( ! empty( $schema['properties']['sticky'] ) && ! empty( $request['sticky'] ) ) {

0 commit comments

Comments
 (0)