Skip to content

Commit 809a34a

Browse files
committed
Catchable fatal error: Argument 1 passed to RunnableSelect::convertValues()
1 parent 0163adc commit 809a34a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Builder/RunnableSelect.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ public function setPreserveTypes($preserveTypes = true) {
6262
public function fetchRows(\Closure $callback = null) {
6363
$statement = $this->createStatement();
6464
$data = $statement->fetchAll(\PDO::FETCH_ASSOC);
65-
if($callback !== null) {
66-
$data = array_map($callback, $data);
67-
}
6865
if($this->preserveTypes) {
6966
$columnDefinitions = $this->getFieldTypes($statement);
7067
foreach($data as &$row) {
7168
$row = $this->convertValues($row, $columnDefinitions);
7269
}
7370
}
71+
if($callback !== null) {
72+
$data = array_map($callback, $data);
73+
}
7474
$statement->closeCursor();
7575
return $data;
7676
}

0 commit comments

Comments
 (0)