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

OAuth2Client POST request invalid parameters #708

Closed
vmtv opened this issue Dec 8, 2016 · 1 comment
Closed

OAuth2Client POST request invalid parameters #708

vmtv opened this issue Dec 8, 2016 · 1 comment

Comments

@vmtv
Copy link

vmtv commented Dec 8, 2016

diff --git a/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php b/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php
index c9bc769..b76f58c 100644
--- a/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php
+++ b/sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php
@@ -233,14 +233,14 @@

 if( $type == "POST" ){
   curl_setopt($ch, CURLOPT_POST, 1);
  •  if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, $params );
    
  •  if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($params, '', '&') );
    
    }
    if( $type == "DELETE" ){
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
    }
    if( $type == "PATCH" ){
    curl_setopt($ch, CURLOPT_POST, 1);
  •  if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, $params );
    
  •  if($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($params, '', '&') );
     curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
    
    }
    $response = curl_exec($ch);
@StorytellerCZ
Copy link
Contributor

#707 ?

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

2 participants