#20543 closed defect (bug) (fixed)

Removing a custom field via XML-RPC results in a PHP Notice

Reported by: scott.gonzalez Owned by: nacin
Priority: normal Milestone: 3.4
Component: XML-RPC Version:
Severity: normal Keywords:
Cc:

Description

In order to remove a custom field, you pass the id without a key or value, but the code is currently checking for a value before determining if the field should be deleted.

PHP Notice: Undefined index: value in .../wp-includes/class-wp-xmlrpc-server.php on line 279

testing against HEAD.

Attachments (1)

20543.patch (905 bytes) - added by scott.gonzalez 13 months ago.

Download all attachments as: .zip

Change History (4)

  • Milestone changed from Awaiting Review to 3.4

http://unit-tests.trac.wordpress.org/changeset/697

php wp-test.php -d -t TestXMLRPCServer_wp_editPost (-d forcing WP_DEBUG on) -- before patch, error due to this notice.

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

In [20583]:

Do not check for a meta value in XML-RPC set_custom_fields unless we know we are editing a key. Prevents a notice when a custom field is being deleted. props scott.gonzalez. fixes #20543.

Note: See TracTickets for help on using tickets.