Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit e838591

Browse files
committed
fix(dbrunner): The key might be scalar
1 parent 896cb4c commit e838591

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Service/Processes/DbRunnerProcessService.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ public function main(object $input): object
2929
$rowCasted = [];
3030

3131
foreach ($row as $key => $value) {
32-
\assert(\is_string($key));
33-
34-
$rowCasted[$key] = $value;
32+
$rowCasted[(string) $key] = $value;
3533
}
3634

3735
$resultArray[] = $rowCasted;

tests/Service/DbRunnerTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,14 @@ public static function runQueryProvider(): array
216216
], /* result */
217217
null, /* exception */
218218
],
219+
[
220+
'',
221+
'SELECT 1;',
222+
[
223+
['1' => 1],
224+
], /* result */
225+
null, /* exception */
226+
],
219227
];
220228
}
221229

0 commit comments

Comments
 (0)