Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plus sign (+) is replaced by space in email or telephone field #14

Open
roxen1234 opened this issue Jul 2, 2013 · 0 comments
Open

plus sign (+) is replaced by space in email or telephone field #14

roxen1234 opened this issue Jul 2, 2013 · 0 comments

Comments

@roxen1234
Copy link

Nice wrapper, but I had the same problem as described in this post:
http://forums.sugarcrm.com/f6/adding-email-addresses-via-rest-plus-sign-replaced-space-setting-relation-81743/

urlencode($jsonEncodedData) resolved the problem for me.

private function rest_request($call_name, $call_arguments) {
    $ch = curl_init(); 
    $post_data = 'method='.$call_name.'&input_type=JSON&response_type=JSON';
    $jsonEncodedData = json_encode($call_arguments);
//  $post_data = $post_data . "&rest_data=" . $jsonEncodedData;
    $post_data = $post_data . "&rest_data=" . urlencode($jsonEncodedData); ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant