[wp-trac] [WordPress Trac] #29750: array_unshift() PHP Warning when wp.getUsersBlogs is attacked (poorly)
WordPress Trac
noreply at wordpress.org
Mon Sep 12 16:36:21 UTC 2016
#29750: array_unshift() PHP Warning when wp.getUsersBlogs is attacked (poorly)
--------------------------+-----------------------------
Reporter: kitchin | Owner:
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: XML-RPC | Version: 4.0
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by kitchin):
I see you have commits in plugins. For core WP, my experience has been to
checkout trunk or develop in SVN and make a patch. The owner will review
it.
Also I have some new notes.
* Like you say, it's an easy fix if we ignore trying to get fancy with the
IXR interface - telling it what to expect, etc.
* Might also want to check that trunk still has this bug!! After the
current release branch 4.6.x, the IXR classes were relocated from a single
file to a directory. I don't know what went into that, or if it was meant
to fix anything.
* Feeding test XML into WP is not that hard but I can't recall if it's
covered by unit tests - apparently not. That might slow you down if the
bug owner asks for tests. I did my testing manually.
* Best practice is to use the develop tree and run command line unit tests
on your patched tree.
* If anyone is tracing IXR code, this is where the code was relocated:
from
`wp-includes/class-IXR.php Line 455 (in WP 4.0)`
to
`wp-includes/IXR/class-IXR-server.php Line 103 (in trunk)`
It looks like this:
{{{#!php
// Perform the callback and send the response
if (count($args) == 1) {
// If only one parameter just send that instead of the whole array
$args = $args[0];
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29750#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list