[wp-trac] [WordPress Trac] #48046: Add array cast before count() in class-wp-xml-server.php
WordPress Trac
noreply at wordpress.org
Mon Sep 16 09:53:05 UTC 2019
#48046: Add array cast before count() in class-wp-xml-server.php
--------------------------+-----------------------------
Reporter: bitcomplex | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.3
Component: XML-RPC | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs
--------------------------+-----------------------------
Comment (by dkarfa):
I believe the Docs is updated already.
{{{
/**
* Checks if the method received at least the minimum number of
arguments.
*
* @since 3.4.0
*
* @param string|array $args Sanitize single string or array of
strings.
* @param int $count Minimum number of arguments.
* @return bool if `$args` contains at least $count arguments.
*/
protected function minimum_args( $args, $count ) {
if ( count( (array)$args ) < $count ) {
$this->error = new IXR_Error( 400, __(
'Insufficient arguments passed to this XML-RPC method.' ) );
return false;
}
return true;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48046#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list