Make WordPress Core


Ignore:
Timestamp:
03/23/2021 11:34:59 PM (4 years ago)
Author:
peterwilsoncc
Message:

REST API: Prevent database error when deleting meta data.

Add a check to WP_REST_Meta_Fields::delete_meta_value() ensuring meta data is set before attempting to delete it from the database. If the data does not exist, the delete is considered successful as the data matches the desired state.

Props BrechtVds, goaroundagain, TimothyBlynJacobs.
Fixes #52787.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.