Skip to content

Commit

Permalink
fix(smi2#202): Fix converting boolean when inserting into int
Browse files Browse the repository at this point in the history
  • Loading branch information
Makar committed Jan 10, 2024
1 parent cefff6a commit c8c9006
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Quote/StrictQuoteLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ function ($v) use ($enclosure_esc, $encode_esc) {
return (string) $value;
}

$value = is_bool($value) ? ($value ? 'true' : 'false') : $value;

if (is_string($value) && $encode) {
if ($tabEncode) {
return str_replace(["\t", "\n"], ['\\t', '\\n'], $value);
Expand Down

1 comment on commit c8c9006

@isublimity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx!

Please sign in to comment.