Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f7d831

Browse filesBrowse files
committed
pass CSV escape characters explicitly
Not passing the $escape parameter is deprecated since PHP 8.4 as the default value will change in the future.
1 parent aef8ed5 commit 2f7d831
Copy full SHA for 2f7d831

File tree

2 files changed

+3
-3
lines changed
Filter options

2 files changed

+3
-3
lines changed

‎src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function find(?string $ip, ?string $url, ?int $limit, ?string $method, ?i
6060

6161
$result = [];
6262
while (\count($result) < $limit && $line = $this->readLineFromFile($file)) {
63-
$values = str_getcsv($line);
63+
$values = str_getcsv($line, ',', '"', '\\');
6464

6565
if (7 !== \count($values)) {
6666
// skip invalid lines
@@ -187,7 +187,7 @@ public function write(Profile $profile): bool
187187
$profile->getTime(),
188188
$profile->getParentToken(),
189189
$profile->getStatusCode(),
190-
]);
190+
], ',', '"', '\\');
191191
fclose($file);
192192
}
193193

‎src/Symfony/Component/Translation/Dumper/CsvFileDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Dumper/CsvFileDumper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function formatCatalogue(MessageCatalogue $messages, string $domain, arra
3131
$handle = fopen('php://memory', 'r+');
3232

3333
foreach ($messages->all($domain) as $source => $target) {
34-
fputcsv($handle, [$source, $target], $this->delimiter, $this->enclosure);
34+
fputcsv($handle, [$source, $target], $this->delimiter, $this->enclosure, '\\');
3535
}
3636

3737
rewind($handle);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.