Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#64248 new defect (bug)

REST API: Logic to only change comment status never runs

Reported by: mamaduka's profile Mamaduka Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: needs-patch needs-unit-tests
Focuses: Cc:

Description

The ::update_item method has special condition for when only comment status is changed, that code path never runs. The $prepared_args always includes fallback values for user IP and agent.

Change History (1)

#1 @swissspidy
4 weeks ago

  • Keywords needs-patch needs-unit-tests added
  • Version set to 4.7

The 127.0.0.1 fallback was added in #38819. There's definitely a gap in test coverage for this part of the code.

Note: See TracTickets for help on using tickets.