What steps will reproduce the problem?
1. Visit addclient.php
2. Fill out the three fields
3. Click Submit
Expected to see the row added to the `clients` table. No row is added.
The fix is to change the variable name in the function declaration on line 40
of pdo_oauth.php to $pw instead of $secret.
@@ -37,7 +37,7 @@
// Little helper function to add a new client to the database
// Do NOT use this in production! This sample code stores the secret in plaintext!
- public function add_client($client_id, $secret, $redirect_uri) {
+ public function add_client($client_id, $pw, $redirect_uri) {
try {
$sql = "insert into clients (client_id, pw, redirect_uri) values (:client_id, :pw, :redirect_uri)";
$stmt = $this->db->prepare($sql);
Original issue reported on code.google.com by aaron.parecki on 25 Jul 2010 at 6:53
Original issue reported on code.google.com by
aaron.parecki
on 25 Jul 2010 at 6:53