Changeset 61460
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r61454 r61460 263 263 * @since 1.5.0 264 264 * 265 * @param array$args {265 * @param int[] $args { 266 266 * Method arguments. Note: arguments must be ordered as documented. 267 267 * … … 269 269 * @type int $1 A second number to add. 270 270 * } 271 * @return int Sum of the two given numbers.271 * @return int|IXR_Error Sum of the two given numbers. 272 272 */ 273 273 public function addTwoNumbers( $args ) { 274 if ( ! is_array( $args ) || count( $args ) !== 2 || ! is_int( $args[0] ) || ! is_int( $args[1] ) ) { 275 $this->error = new IXR_Error( 400, __( 'Invalid arguments passed to this XML-RPC method. Requires two integers.' ) ); 276 return $this->error; 277 } 278 274 279 $number1 = $args[0]; 275 280 $number2 = $args[1];
Note: See TracChangeset
for help on using the changeset viewer.