Skip to content

Commit cb3a752

Browse files
Merge pull request #122 from dbrw/master
illuminate database 5.2 and up fetchmode problem
2 parents e974b4e + e24b303 commit cb3a752

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Phpmig/Adapter/Illuminate/Database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public function __construct($adapter, $tableName, $connectionName = '')
3838
*/
3939
public function fetchAll()
4040
{
41-
$fetchMode = $this->adapter
42-
->getFetchMode();
41+
$fetchMode = (method_exists($this->adapter, 'getFetchMode')) ?
42+
$this->adapter->getFetchMode() : PDO::FETCH_OBJ;
4343

4444
$all = $this->adapter
4545
->table($this->tableName)

0 commit comments

Comments
 (0)