Title: Error in function
Last modified: November 29, 2016

---

# Error in function

 *  [enriquecerda](https://wordpress.org/support/users/enriquecerda/)
 * (@enriquecerda)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/error-in-function-2/)
 * Hello.
 * The plugin work fine, but it have a problen when you have a URL with ‘ ‘(space)
   o ‘~’. The problem is the function static urlencode_rfc3986 in class WP_REST_OAuth1,
   the definition is
 * protected static function urlencode_rfc3986( $value ) {
    return str_replace( 
   array( ‘+’, ‘%7E’ ), array( ‘ ‘, ‘~’ ), rawurlencode( $value)); }
 * But really no make this function, because the str_replace need change the array,
   the new definition work:
 * protected static function urlencode_rfc3986( $value ) {
    return str_replace( 
   array( ‘ ‘, ‘~’ ), array( ‘+’, ‘%7E’ ), rawurlencode( $value ) ); }

The topic ‘Error in function’ is closed to new replies.

 * ![](https://ps.w.org/rest-api-oauth1/assets/icon-256x256.png?rev=3004388)
 * [WP REST API - OAuth 1.0a Server](https://wordpress.org/plugins/rest-api-oauth1/)
 * [Support Threads](https://wordpress.org/support/plugin/rest-api-oauth1/)
 * [Active Topics](https://wordpress.org/support/plugin/rest-api-oauth1/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rest-api-oauth1/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [enriquecerda](https://wordpress.org/support/users/enriquecerda/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/error-in-function-2/)
 * Status: not resolved