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.
Built from https://develop.svn.wordpress.org/trunk@59672


git-svn-id: http://core.svn.wordpress.org/trunk@59015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-01-21 15:34:20 +00:00
parent 783c6905dd
commit 0f51cfd3b4
2 changed files with 5 additions and 3 deletions

View File

@ -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' => '',

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59671';
$wp_version = '6.8-alpha-59672';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.