Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(configuration): export "NULL" values correctly to remote server (#…
Browse files Browse the repository at this point in the history
…8281)

Co-authored-by: Colin Gagnaire <[email protected]>
  • Loading branch information
garnier-quentin and cgagnaire committed Mar 19, 2020
1 parent 9e1829f commit f7eacf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions www/class/config-generate-remote/Abstracts/AbstractObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ protected function writeObject(array $object): void
$append = '';
for ($i = 0; $i < count($this->attributesWrite); $i++) {
if (isset($object[$this->attributesWrite[$i]]) && strlen($object[$this->attributesWrite[$i]])) {
$line .= $append . $object[$this->attributesWrite[$i]];
$line .= $append . '"' . str_replace('"', '""', $object[$this->attributesWrite[$i]]) . '"';
} else {
$line .= $append . 'NULL';
$line .= $append . '\N';
}
$append = $this->fieldSeparatorInfile;
}
Expand Down
4 changes: 2 additions & 2 deletions www/class/config-generate-remote/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ protected function __construct(\Pimple\Container $dependencyInjector)
'infile_clauses' => [
'fields_clause' => [
'terminated_by' => $this->fieldSeparatorInfile,
'enclosed_by' => '',
'escaped_by' => '',
'enclosed_by' => '"',
'escaped_by' => '\\\\',
],
'lines_clause' => [
'terminated_by' => $this->lineSeparatorInfile,
Expand Down

0 comments on commit f7eacf3

Please sign in to comment.