Skip to content

Commit 992a3bd

Browse files
committed
Removed redundant empty check
1 parent a21c51f commit 992a3bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ public function register_routes() {
123123
* @return true|WP_Error True if the request has read access, error object otherwise.
124124
*/
125125
public function get_items_permissions_check( $request ) {
126-
$is_note = ! empty( $request['type'] ) && 'note' === $request['type'];
127-
$is_edit_context = ! empty( $request['context'] ) && 'edit' === $request['context'];
126+
$is_note = 'note' === $request['type'];
127+
$is_edit_context = 'edit' === $request['context'];
128128

129129
if ( ! empty( $request['post'] ) ) {
130130
foreach ( (array) $request['post'] as $post_id ) {

0 commit comments

Comments
 (0)