Skip to content

Commit 41e124a

Browse files
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
1 parent 2adec31 commit 41e124a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/wp-includes/class-wp-xmlrpc-server.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6434,9 +6434,10 @@ public function mw_newMediaObject( $args ) {
64346434
$upload = wp_upload_bits( $name, null, $bits );
64356435
if ( ! empty( $upload['error'] ) ) {
64366436
/* translators: 1: File name, 2: Error message. */
6437-
$errorString = sprintf( __( 'Could not write file %1$s (%2$s).' ), $name, $upload['error'] );
6438-
return new IXR_Error( 500, $errorString );
6437+
$error_string = sprintf( __( 'Could not write file %1$s (%2$s).' ), $name, $upload['error'] );
6438+
return new IXR_Error( 500, $error_string );
64396439
}
6440+
64406441
// Construct the attachment array.
64416442
$post_id = 0;
64426443
if ( ! empty( $data['post_id'] ) ) {
@@ -6446,6 +6447,7 @@ public function mw_newMediaObject( $args ) {
64466447
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
64476448
}
64486449
}
6450+
64496451
$attachment = array(
64506452
'post_title' => $name,
64516453
'post_content' => '',

0 commit comments

Comments
 (0)