Skip to content

Commit 94d37ce

Browse files
authored
Merge branch 'main' into add-retry-function
2 parents 3c01213 + b8134b2 commit 94d37ce

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* added retry function
2+
* fixed result with empty list
23
* added optional type in prepare statment
34

45
## 1.5.6

src/QueryResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected function fillRows($rows)
172172
foreach ($row['items'] as $i => $item)
173173
{
174174
$values = array_values($item);
175-
$value = $values[0];
175+
$value = count($values)>0?$values[0]:[];;
176176
$column = $this->columns[$i];
177177
if ($value === null)
178178
{

tests/CheckTypeTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ public function test(){
179179
'v' => [2],
180180
]);
181181

182+
$query = "DECLARE \$v as List<Int32>; SELECT \$v as val;";
183+
$prepared = $session->prepare($query);
184+
$result = $prepared->execute([
185+
'v' => [],
186+
]);
187+
182188
foreach ($checkTypes as $type=>$data) {
183189
$query = "DECLARE \$v as $type; SELECT \$v as val;";
184190
$prepared = $session->prepare($query);

0 commit comments

Comments
 (0)