Changeset 49862
- Timestamp:
- 12/21/2020 08:21:12 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/IXR/class-IXR-server.php
r47926 r49862 130 130 $error = new IXR_Error($error, $message); 131 131 } 132 133 if ( function_exists( 'status_header' ) ) { 134 status_header( $error->code ); 135 } 136 132 137 $this->output($error->getXml()); 133 138 } -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r49856 r49862 287 287 * @since 3.5.0 288 288 * 289 * @param string$error The XML-RPC error message.290 * @param WP_Error $user WP_Error object.289 * @param IXR_Error $error The XML-RPC error message. 290 * @param WP_Error $user WP_Error object. 291 291 */ 292 292 $this->error = apply_filters( 'xmlrpc_login_error', $this->error, $user ); -
trunk/tests/phpunit/tests/xmlrpc/basic.php
r48937 r49862 15 15 // If disabled, 405 would result. 16 16 $this->assertSame( 403, $result->code ); 17 } 18 19 function test_disabled() { 20 add_filter( 'xmlrpc_enabled', '__return_false' ); 21 22 $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'username', 'password' ) ); 23 24 $this->assertIXRError( $result ); 25 $this->assertSame( 405, $result->code ); 17 26 } 18 27
Note: See TracChangeset
for help on using the changeset viewer.