Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#2350 closed defect (bug) (fixed)


Reported by: juergen's profile Juergen Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: bg|2nd-opinion bg|dev-feedback bg|has-patch
Focuses: Cc:


xmlrpc.php spits out that error when accessed not via POST. Fix attached.

Attachments (1)

xmlrpc.patch (481 bytes) - added by Juergen 17 years ago.

Download all attachments as: .zip

Change History (5)

17 years ago

#1 @westi
17 years ago

  • Keywords bg|2nd-opinion bg|dev-feedback bg|has-patch added
  • Milestone set to 2.0.1
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

I'm not sure this patch is necessary.

Navigating to xmlrpc.php works fine for me on my test site running on PHP 4.4.0.

I get the expected: "XML-RPC server accepts POST requests only."

I can't see why we need to check for the variable before calling trim afterall trim has to cope with the variable you pass it containing an empty string anyway?!?

Marking this against 2.0.1 but feel that probably is WONTFIX.

#2 @Juergen
17 years ago

I get that "XML-RPC server accepts POST requests only." too.

But additionaly I get a 'PHP Notice: Undefined variable: HTTP_RAW_POST_DATA in /sites/blog/wp/xmlrpc.php on line 9' for each non-POST request in my syslog (I'm using error_log = syslog).

It might be possible to work around this by setting 'always_populate_raw_post_data = On' but I think it's cleaner to check whether HTTP_RAW_POST_DATA is set before using it.

#3 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3498]) Check if HTTP_RAW_POST_DATA is set to avoid undefined var warning. Props Juergen. fixes #2350

#4 @(none)
17 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.