Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#58218 closed defect (bug) (fixed)

Unused local variable $parent_post_type in class-wp-rest-revisions-controller.php

Reported by: soean's profile Soean Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: normal Version: 5.5
Component: REST API Keywords: has-patch commit good-first-bug
Focuses: Cc:

Description (last modified by SergeyBiryukov)

We should remove a unused local variable $parent_post_type. The value of the variable is not used anywhere.

Introduced in Change [47850] GitHub

Change History (5)

This ticket was mentioned in PR #4393 on WordPress/wordpress-develop by @Soean.


17 months ago
#1

Removes unused local variable '$parent_post_type'. The value of the variable is not used anywhere.

Trac ticket: https://core.trac.wordpress.org/ticket/58218

#2 @mukesh27
17 months ago

  • Keywords commit good-first-bug added
  • Milestone changed from Awaiting Review to 6.3

Nice catch @Soean, PR LGTM and approved.

#3 @SergeyBiryukov
17 months ago

  • Description modified (diff)

#4 @SergeyBiryukov
17 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 55696:

REST API: Remove unused variable from the permissions check for deleting a revision.

WP_REST_Revisions_Controller::delete_item_permissions_check() no longer uses the value of the $parent_post_type variable anywhere.

Follow-up to [45812], [47547], [47850].

Props Soean, mukesh27.
Fixes #58218.

@SergeyBiryukov commented on PR #4393:


17 months ago
#5

Thanks for the PR! Merged in r55696.

Note: See TracTickets for help on using tickets.