fix: add explicit escape param to fputcsv to silence PHP 8.3+ deprecation
All checks were successful
Deploy Production / Deploy to Production (push) Successful in 50s

Whoops converts the E_DEPRECATED into an exception, causing a 500.
Pass '"' and '\\' explicitly to match the current default behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-06-01 17:47:21 +02:00
parent e97a3501ed
commit ec7aab8b6a

View file

@ -36,7 +36,7 @@ Kirby::plugin('world-game/csv-export', [
$out = fopen('php://output', 'w');
fputs($out, "\xEF\xBB\xBF"); // BOM pour Excel
fputcsv($out, ['Prénom', 'Nom', 'Email', 'Entreprise', 'Fonction', 'Livres blancs', 'Date'], ';');
fputcsv($out, ['Prénom', 'Nom', 'Email', 'Entreprise', 'Fonction', 'Livres blancs', 'Date'], ';', '"', '\\');
foreach ($entries as $entry) {
$uuids = $entry->whitePaper()->value();
@ -59,7 +59,7 @@ Kirby::plugin('world-game/csv-export', [
$entry->role()->value(),
implode(' | ', $titles),
$entry->downloadedAt()->value(),
], ';');
], ';', '"', '\\');
}
fclose($out);