From 41e124ad55b3c6e9d93c7a71b1dea903a174aafc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jan 2025 15:32:31 +0000 Subject: [PATCH] Coding Standards: Rename the `$errorString` variable in `wp_xmlrpc_server` methods. This resolves a WPCS warning: {{{ Variable "$errorString" is not in valid snake_case format, try "$error_string" }}} Follow-up to [5054]. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59672 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-xmlrpc-server.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 14a8843e4f..601717e7e8 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -6434,9 +6434,10 @@ class wp_xmlrpc_server extends IXR_Server { $upload = wp_upload_bits( $name, null, $bits ); if ( ! empty( $upload['error'] ) ) { /* translators: 1: File name, 2: Error message. */ - $errorString = sprintf( __( 'Could not write file %1$s (%2$s).' ), $name, $upload['error'] ); - return new IXR_Error( 500, $errorString ); + $error_string = sprintf( __( 'Could not write file %1$s (%2$s).' ), $name, $upload['error'] ); + return new IXR_Error( 500, $error_string ); } + // Construct the attachment array. $post_id = 0; if ( ! empty( $data['post_id'] ) ) { @@ -6446,6 +6447,7 @@ class wp_xmlrpc_server extends IXR_Server { return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); } } + $attachment = array( 'post_title' => $name, 'post_content' => '',