Skip to content

Commit c154304

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents a967b6c + 7855c9e commit c154304

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Builder/RunnableSelect.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ public function fetchGroups(array $fields) {
116116
$tmp = &$result;
117117
foreach($fields as $field) {
118118
$value = $row[$field];
119-
$tmp[$value] = [];
119+
if(!array_key_exists($value, $tmp)) {
120+
$tmp[$value] = [];
121+
}
120122
$tmp = &$tmp[$value];
121123
}
122-
$tmp = $row;
124+
$tmp[] = $row;
123125
}
124126
return $result;
125127
}
@@ -136,7 +138,7 @@ public function fetchArray() {
136138

137139
/**
138140
* @param mixed $default
139-
* @return string[]
141+
* @return null|bool|string|int|float
140142
*/
141143
public function fetchValue($default = null) {
142144
$statement = $this->createStatement();

0 commit comments

Comments
 (0)