Skip to content

Commit

Permalink
Explicitly set \PDO::FETCH_ASSOC in PdoAdapter::findUser()
Browse files Browse the repository at this point in the history
Fixes #13
  • Loading branch information
jeremykendall committed Mar 25, 2015
1 parent 3f1872b commit 971fb1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/JeremyKendall/Slim/Auth/Adapter/Db/PdoAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ private function findUser()
$stmt = $this->db->prepare($sql);
$stmt->execute(array('identity' => $this->getIdentity()));

return $stmt->fetch();
// Explicitly setting fetch mode fixes
// https://github.com/jeremykendall/slim-auth/issues/13
return $stmt->fetch(PDO::FETCH_ASSOC);
}

/**
Expand Down

0 comments on commit 971fb1a

Please sign in to comment.