We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0163adc commit 809a34aCopy full SHA for 809a34a
src/Builder/RunnableSelect.php
@@ -62,15 +62,15 @@ public function setPreserveTypes($preserveTypes = true) {
62
public function fetchRows(\Closure $callback = null) {
63
$statement = $this->createStatement();
64
$data = $statement->fetchAll(\PDO::FETCH_ASSOC);
65
- if($callback !== null) {
66
- $data = array_map($callback, $data);
67
- }
68
if($this->preserveTypes) {
69
$columnDefinitions = $this->getFieldTypes($statement);
70
foreach($data as &$row) {
71
$row = $this->convertValues($row, $columnDefinitions);
72
}
73
+ if($callback !== null) {
+ $data = array_map($callback, $data);
+ }
74
$statement->closeCursor();
75
return $data;
76
0 commit comments