Commit d7fa2dbb1d for wordpress.org

commit d7fa2dbb1d624fcc1f4dba63339478dc14fc1aa6
Author: Weston Ruter <weston@xwp.co>
Date:   Fri Jan 9 20:32:55 2026 +0000

    XML-RPC: Update `addTwoNumbers` demo method to check args prior to adding.

    Invalid args now cause an `IXR_Error` to be returned.

    Comprehensive unit tests are also added for the method.

    Developed in https://github.com/WordPress/wordpress-develop/pull/10690

    Follow-up to [1348].

    Props josephscott, westonruter.
    Fixes #64479.

    Built from https://develop.svn.wordpress.org/trunk@61460


    git-svn-id: http://core.svn.wordpress.org/trunk@60772 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php
index 0ae193ed54..3b1870edf1 100644
--- a/wp-includes/class-wp-xmlrpc-server.php
+++ b/wp-includes/class-wp-xmlrpc-server.php
@@ -262,15 +262,20 @@ class wp_xmlrpc_server extends IXR_Server {
 	 *
 	 * @since 1.5.0
 	 *
-	 * @param array $args {
+	 * @param int[] $args {
 	 *     Method arguments. Note: arguments must be ordered as documented.
 	 *
 	 *     @type int $0 A number to add.
 	 *     @type int $1 A second number to add.
 	 * }
-	 * @return int Sum of the two given numbers.
+	 * @return int|IXR_Error Sum of the two given numbers.
 	 */
 	public function addTwoNumbers( $args ) {
+		if ( ! is_array( $args ) || count( $args ) !== 2 || ! is_int( $args[0] ) || ! is_int( $args[1] ) ) {
+			$this->error = new IXR_Error( 400, __( 'Invalid arguments passed to this XML-RPC method. Requires two integers.' ) );
+			return $this->error;
+		}
+
 		$number1 = $args[0];
 		$number2 = $args[1];
 		return $number1 + $number2;
diff --git a/wp-includes/css/dist/index.php b/wp-includes/css/dist/index.php
index 7e238db692..4ef87630f3 100644
--- a/wp-includes/css/dist/index.php
+++ b/wp-includes/css/dist/index.php
@@ -7,11 +7,6 @@
  */

 return array(
-	array(
-		'handle' => 'wp-preferences',
-		'path' => 'preferences/style',
-		'dependencies' => array('wp-components'),
-	),
 	array(
 		'handle' => 'wp-nux',
 		'path' => 'nux/style',
@@ -23,20 +18,20 @@ return array(
 		'dependencies' => array('wp-components'),
 	),
 	array(
-		'handle' => 'wp-reusable-blocks',
-		'path' => 'reusable-blocks/style',
-		'dependencies' => array('wp-block-editor', 'wp-components'),
-	),
-	array(
-		'handle' => 'wp-patterns',
-		'path' => 'patterns/style',
-		'dependencies' => array('wp-block-editor', 'wp-components'),
+		'handle' => 'wp-preferences',
+		'path' => 'preferences/style',
+		'dependencies' => array('wp-components'),
 	),
 	array(
 		'handle' => 'wp-commands',
 		'path' => 'commands/style',
 		'dependencies' => array('wp-components'),
 	),
+	array(
+		'handle' => 'wp-reusable-blocks',
+		'path' => 'reusable-blocks/style',
+		'dependencies' => array('wp-block-editor', 'wp-components'),
+	),
 	array(
 		'handle' => 'wp-components',
 		'path' => 'components/style',
@@ -47,6 +42,11 @@ return array(
 		'path' => 'widgets/style',
 		'dependencies' => array('wp-block-editor', 'wp-components'),
 	),
+	array(
+		'handle' => 'wp-patterns',
+		'path' => 'patterns/style',
+		'dependencies' => array('wp-block-editor', 'wp-components'),
+	),
 	array(
 		'handle' => 'wp-format-library',
 		'path' => 'format-library/style',
@@ -57,26 +57,26 @@ return array(
 		'path' => 'block-directory/style',
 		'dependencies' => array('wp-block-editor', 'wp-components', 'wp-editor'),
 	),
-	array(
-		'handle' => 'wp-customize-widgets',
-		'path' => 'customize-widgets/style',
-		'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-preferences', 'wp-widgets'),
-	),
 	array(
 		'handle' => 'wp-media-utils',
 		'path' => 'media-utils/style',
 		'dependencies' => array('wp-components'),
 	),
 	array(
-		'handle' => 'wp-edit-post',
-		'path' => 'edit-post/style',
-		'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-commands', 'wp-components', 'wp-editor', 'wp-preferences', 'wp-widgets'),
+		'handle' => 'wp-customize-widgets',
+		'path' => 'customize-widgets/style',
+		'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-preferences', 'wp-widgets'),
 	),
 	array(
 		'handle' => 'wp-edit-widgets',
 		'path' => 'edit-widgets/style',
 		'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences', 'wp-widgets'),
 	),
+	array(
+		'handle' => 'wp-edit-post',
+		'path' => 'edit-post/style',
+		'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-commands', 'wp-components', 'wp-editor', 'wp-preferences', 'wp-widgets'),
+	),
 	array(
 		'handle' => 'wp-block-library',
 		'path' => 'block-library/style',
@@ -87,14 +87,14 @@ return array(
 		'path' => 'editor/style',
 		'dependencies' => array('wp-block-editor', 'wp-commands', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences'),
 	),
-	array(
-		'handle' => 'wp-block-editor',
-		'path' => 'block-editor/style',
-		'dependencies' => array('wp-commands', 'wp-components', 'wp-preferences'),
-	),
 	array(
 		'handle' => 'wp-edit-site',
 		'path' => 'edit-site/style',
 		'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-commands', 'wp-components', 'wp-editor', 'wp-patterns', 'wp-preferences', 'wp-widgets'),
 	),
+	array(
+		'handle' => 'wp-block-editor',
+		'path' => 'block-editor/style',
+		'dependencies' => array('wp-commands', 'wp-components', 'wp-preferences'),
+	),
 );
diff --git a/wp-includes/js/dist/script-modules/index.php b/wp-includes/js/dist/script-modules/index.php
index 89dd1fa569..dab5c02159 100644
--- a/wp-includes/js/dist/script-modules/index.php
+++ b/wp-includes/js/dist/script-modules/index.php
@@ -8,9 +8,9 @@

 return array(
 	array(
-		'id' => '@wordpress/core-abilities',
-		'path' => 'core-abilities/index',
-		'asset' => 'core-abilities/index.min.asset.php',
+		'id' => '@wordpress/a11y',
+		'path' => 'a11y/index',
+		'asset' => 'a11y/index.min.asset.php',
 	),
 	array(
 		'id' => '@wordpress/interactivity-router',
@@ -22,16 +22,16 @@ return array(
 		'path' => 'interactivity-router/full-page',
 		'asset' => 'interactivity-router/full-page.min.asset.php',
 	),
+	array(
+		'id' => '@wordpress/core-abilities',
+		'path' => 'core-abilities/index',
+		'asset' => 'core-abilities/index.min.asset.php',
+	),
 	array(
 		'id' => '@wordpress/interactivity',
 		'path' => 'interactivity/index',
 		'asset' => 'interactivity/index.min.asset.php',
 	),
-	array(
-		'id' => '@wordpress/a11y',
-		'path' => 'a11y/index',
-		'asset' => 'a11y/index.min.asset.php',
-	),
 	array(
 		'id' => '@wordpress/abilities',
 		'path' => 'abilities/index',
@@ -47,16 +47,16 @@ return array(
 		'path' => 'latex-to-mathml/loader',
 		'asset' => 'latex-to-mathml/loader.min.asset.php',
 	),
-	array(
-		'id' => '@wordpress/route',
-		'path' => 'route/index',
-		'asset' => 'route/index.min.asset.php',
-	),
 	array(
 		'id' => '@wordpress/edit-site-init',
 		'path' => 'edit-site-init/index',
 		'asset' => 'edit-site-init/index.min.asset.php',
 	),
+	array(
+		'id' => '@wordpress/route',
+		'path' => 'route/index',
+		'asset' => 'route/index.min.asset.php',
+	),
 	array(
 		'id' => '@wordpress/lazy-editor',
 		'path' => 'lazy-editor/index',
diff --git a/wp-includes/version.php b/wp-includes/version.php
index b1943f62e8..0dad98d76e 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.0-alpha-61459';
+$wp_version = '7.0-alpha-61460';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.