Skip to content

Commit

Permalink
Merge pull request #122 from dbrw/master
Browse files Browse the repository at this point in the history
illuminate database 5.2 and up fetchmode problem
  • Loading branch information
davedevelopment committed Feb 8, 2017
2 parents e974b4e + e24b303 commit cb3a752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Phpmig/Adapter/Illuminate/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function __construct($adapter, $tableName, $connectionName = '')
*/
public function fetchAll()
{
$fetchMode = $this->adapter
->getFetchMode();
$fetchMode = (method_exists($this->adapter, 'getFetchMode')) ?
$this->adapter->getFetchMode() : PDO::FETCH_OBJ;

$all = $this->adapter
->table($this->tableName)
Expand Down

0 comments on commit cb3a752

Please sign in to comment.