Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#43216 closed defect (bug) (fixed)

IXR Server Warning

Reported by: EatonZ Owned by: dd32
Priority: normal Milestone: 4.9.5
Component: XML-RPC Version: 4.9.2
Severity: normal Keywords: fixed-major commit
Cc: Focuses:

Description

I've recently upgraded my site to PHP 7.2 and started getting these in the logs:

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in \wp-includes\IXR\class-IXR-server.php on line 101

This is due to a PHP 7.2 change - you need to update this file for PHP 7.2.

PS: Not sure what IXR is, so I'm assigning it to "General".

Change History (7)

#1 @SergeyBiryukov
9 years ago

  • Component General → XML-RPC
  • Milestone Awaiting Review → 4.9.4

#2 @redsweater
9 years ago

I'm assuming this is a runtime log message and not something that PHP logs while simply loading/parsing the file.

The line of code where it occurs indicates that the WordPress instance in question is being connected to by an XMLRPC client who invoking method with no parameters. The vast majority of supported XMLRPC methods require parameters, but for example "demo.sayHello" does not. I imagine invoking that method on such a system would exhibit the problem.

#3 @dd32
9 years ago

  • Owner set to dd32
  • Resolution → fixed
  • Status new → closed

In 42652:

XML-RPC: Add default values to IXR_Message for PHP 7.2 compatibility to avoid PHP Warnings.

Fixes #43216 for trunk.

#4 @dd32
9 years ago

  • Keywords fixed-major commit added
  • Resolution fixed
  • Status closed → reopened

re-opening for 4.9 backport once verified fixed.

I used the following to trigger it:

curl -X POST http://wordpress-develop/src/xmlrpc.php -d '<?xml version="1.0"?><methodCall><methodName>demo.sayHello</methodName></methodCall>'

#5 @dd32
9 years ago

  • Milestone 4.9.4 → 4.9.5

Bumping, 4.9.4 has been released.

#6 @SergeyBiryukov
9 years ago

  • Resolution → fixed
  • Status reopened → closed

In 42806:

XML-RPC: Add default values to IXR_Message for PHP 7.2 compatibility to avoid PHP Warnings.

Props dd32.
Merges [42652] to the 4.9 branch.
Fixes #43216.

#7 @dd32
9 years ago

It's been mentioned elsewhere that the changes in [42652] may not be compatible with existing uses, specifically the = false; additions.

Although there's unlikely to be any side effects of this, I'm commenting to say that only the = array() change was really needed here, and the rest was mostly just irrelevant.

Note: See TracTickets for help on using tickets.