Skip to content

Commit 984f441

Browse files
committed
fix #45
1 parent 4dc3c18 commit 984f441

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private function stringLineMaker($array, $prepend = '')
226226

227227
$output .= "\n{$prepend} '{$key}' => [{$value}\n{$prepend} ],";
228228
} else {
229-
$value = addslashes($value);
229+
$value = str_replace('\"', '"', addslashes($value));
230230

231231
$output .= "\n{$prepend} '{$key}' => '{$value}',";
232232
}

tests/ManagerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public function testWriteFile()
8383
$values = [
8484
'name' => ['first' => 'first', 'last' => ['last1' => '1', 'last2' => 2]],
8585
'age' => 'age',
86+
'double_quotes' => '"with quotes"',
87+
'quotes' => "With some ' quotes",
8688
];
8789

8890
$manager->writeFile($filePath, $values);

0 commit comments

Comments
 (0)