Skip to content

Commit 6e1159a

Browse files
d-enknekufa
authored andcommitted
fix: deep wrapping binary string in array/map tuple fields
1 parent 0ad21f0 commit 6e1159a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

php/Job/Space/Select.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ public function run(): array
7676
}
7777

7878
if (!json_encode($data)) {
79-
foreach ($data as $i => $tuple) {
80-
foreach ($tuple as $k => $v) {
79+
foreach ($data as $i => &$tuple) {
80+
array_walk_recursive($tuple, function (&$v) {
8181
if (is_string($v) && !json_encode($v)) {
82-
$data[$i][$k] = '!!binary ' . base64_encode($v);
82+
$v = '!!binary ' . base64_encode($v);
8383
}
84-
}
84+
});
8585
}
8686
}
8787

0 commit comments

Comments
 (0)