Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alaa Sarhan committed Dec 3, 2023
1 parent 4674c57 commit d233d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Flatten.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private function flattenGenerator($var, $prefix)
}
}

$prefix .= (empty($prefix) ? '' : $this->separator);
$prefix .= ($prefix == '' ? '' : $this->separator);
foreach ($var as $key => $value) {
foreach ($this->flattenGenerator($value, $prefix . $key) as $k => $v) {
yield $k => $v;
Expand Down

0 comments on commit d233d36

Please sign in to comment.