Make WordPress Core

Opened 2 years ago

Closed 21 months ago

Last modified 21 months ago

#23811 closed defect (bug) (fixed)

XML-RPC shouldn't display errors

Reported by: koke Owned by: markjaquith
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.5.1
Component: XML-RPC Keywords: mobile has-patch
Focuses: Cc:


I've got some user reports of XML-RPC returning this:

<a href='function.strpos'>function.strpos</a>

In this case, it seems to be #18310, but XML-RPC shouldn't be throwing any warnings, since that makes the client think the request failed when it actually succeeded

Attachments (4)

23811.diff (453 bytes) - added by markoheijnen 2 years ago.
Possible fix
23811.2.diff (719 bytes) - added by kovshenin 2 years ago.
23811.3.diff (1006 bytes) - added by nacin 21 months ago.
23811.4.diff (479 bytes) - added by markjaquith 21 months ago.
once, after

Download all attachments as: .zip

Change History (11)

@markoheijnen2 years ago

Possible fix

comment:1 @markoheijnen2 years ago

  • Milestone changed from Awaiting Review to 3.6

Moving to 3.6 for future discussions.

@kovshenin2 years ago

comment:3 @kovshenin2 years ago

  • Keywords has-patch added

23811.2.diff is similar to Marko's patch but for the WP_DEBUG_DISPLAY constant instead, which then sets display_errors.

comment:4 @markoheijnen23 months ago

That doesn't exactly works the same. Your patch only works when WP_DEBUG is true and my one only works when WP_DEBUG is false.

I guess the issue here is that the server definition is display_errors: 1. So I guess both patches make sense to commit then?

comment:5 @SergeyBiryukov23 months ago

23811.diff makes sense to me.

Not sure if WP_DEBUG_DISPLAY should default to false for XML-RPC, it doesn't for AJAX either.

Version 0, edited 23 months ago by SergeyBiryukov (next)

@nacin21 months ago

@markjaquith21 months ago

once, after

comment:6 @markjaquith21 months ago

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

In 24564:

Don't display errors for XML-RPC requests, as they malform the response.

fixes #23811. props kovshenin, markoheijnen.

comment:7 @nacin21 months ago

In 24581:

Documentation for [24564]. see #23811.

Note: See TracTickets for help on using tickets.