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
This commit is contained in:
Sergey Biryukov 2025-01-21 15:32:31 +00:00
parent 2adec312ef
commit 41e124ad55

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