Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#52793 closed defect (bug) (duplicate)

REST API: Sending empty array for single = false meta returns a 500 error if the there is not meta do delete

Reported by: goaroundagain's profile goaroundagain Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.7
Component: REST API Keywords: has-unit-tests needs-patch
Focuses: rest-api Cc:

Description

If the Block Editor sends with WordPress 5.7 an empty array for single = false meta and there is no meta to delete, it returns a 500 error.

The default behaver of the Block Editor is to send an empty array for unset single = false meta.

This bug was introduced through this fix: https://core.trac.wordpress.org/ticket/50790

I will provide an updated unit test

Attachments (1)

52793.diff (854 bytes) - added by goaroundagain 3 years ago.
Updated Test to show error

Download all attachments as: .zip

Change History (3)

#1 follow-up: @TimothyBlynJacobs
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @goaroundagain,

Thanks for the ticket. We're tracking this in #52787.

@goaroundagain
3 years ago

Updated Test to show error

#2 in reply to: ↑ 1 @goaroundagain
3 years ago

Replying to TimothyBlynJacobs:

Hi @goaroundagain,

Thanks for the ticket. We're tracking this in #52787.

Hi @TimothyBlynJacobs,

sorry, overlooked that ticket :)

Note: See TracTickets for help on using tickets.