Skip to content

Commit

Permalink
fix: deep wrapping binary string in array/map tuple fields
Browse files Browse the repository at this point in the history
  • Loading branch information
d-enk authored and nekufa committed Mar 13, 2024
1 parent 0ad21f0 commit 6e1159a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions php/Job/Space/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ public function run(): array
}

if (!json_encode($data)) {
foreach ($data as $i => $tuple) {
foreach ($tuple as $k => $v) {
foreach ($data as $i => &$tuple) {
array_walk_recursive($tuple, function (&$v) {
if (is_string($v) && !json_encode($v)) {
$data[$i][$k] = '!!binary ' . base64_encode($v);
$v = '!!binary ' . base64_encode($v);
}
}
});
}
}

Expand Down

0 comments on commit 6e1159a

Please sign in to comment.