Ticket #47905: 47905.diff
File 47905.diff, 1010 bytes (added by , 5 years ago) |
---|
-
src/wp-includes/rest-api.php
1209 1209 1210 1210 if ( 'boolean' === $args['type'] && ! rest_is_boolean( $value ) ) { 1211 1211 /* translators: 1: parameter, 2: type name */ 1212 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $ value, 'boolean' ) );1212 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'boolean' ) ); 1213 1213 } 1214 1214 1215 1215 if ( 'string' === $args['type'] && ! is_string( $value ) ) { … … 1233 1233 case 'ip': 1234 1234 if ( ! rest_is_ip_address( $value ) ) { 1235 1235 /* translators: %s: IP address */ 1236 return new WP_Error( 'rest_invalid_param', sprintf( __( '%s is not a valid IP address.' ), $ value) );1236 return new WP_Error( 'rest_invalid_param', sprintf( __( '%s is not a valid IP address.' ), $param ) ); 1237 1237 } 1238 1238 break; 1239 1239 }