mengmengdong / oauth2-php

Automatically exported from code.google.com/p/oauth2-php
MIT License
0 stars 0 forks source link

Small typo in the code #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  addclient.php doesn't work with the pdo implementation.

What is the expected output? What do you see instead?
- Adding client in the db.
- No client is added in the db and no error.

What version of the product are you using? On what operating system?
draft 9

Please provide any additional information below.

In 
            $stmt = $this->db->prepare($sql);
            $stmt->bindParam(":client_id", $client_id, PDO::PARAM_STR);
            $stmt->bindParam(":pw", $pw, PDO::PARAM_STR);
            $stmt->bindParam(":redirect_uri", $redirect_uri, PDO::PARAM_STR);
            $stmt->execute();

it's not
            $stmt->bindParam(":pw", $pw, PDO::PARAM_STR);
but (probably)
            $stmt->bindParam(":pw", $secret, PDO::PARAM_STR);
That is the parameter given in the function call
    public function add_client($client_id, $secret, $redirect_uri) {

Original issue reported on code.google.com by gabriel....@gmail.com on 11 Aug 2010 at 2:45

GoogleCodeExporter commented 8 years ago
This has been corrected in rev 1c58440e66

Original comment by aaron.parecki on 13 Aug 2010 at 5:15