Issue 1: Problem adding clients in example pdo_oauth.php
Status:  Fixed
Owner:
Closed:  Aug 2010
Project Member Reported by aaron.parecki, Jul 25, 2010
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);


Aug 3, 2010
Project Member #2 aaron.parecki
Fixed in revision 1c58440e66