From e1bb9518643835f49d1780440cc1154dc984a11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Brada?= Date: Wed, 22 Apr 2026 23:26:34 +0200 Subject: [PATCH] Pass explicit $escape argument to fgetcsv/fputcsv for PHP 8.4 compatibility As of PHP 8.4.0, relying on the default value of the $escape parameter in fgetcsv()/fputcsv() is deprecated. Pass '\\' explicitly to silence the deprecation notice and keep existing behavior. --- Module/I18n/Dictionary/Loader/File/Csv.php | 2 +- Module/I18n/Dictionary/Writer/Csv.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Module/I18n/Dictionary/Loader/File/Csv.php b/Module/I18n/Dictionary/Loader/File/Csv.php index c857061..e73f6d1 100755 --- a/Module/I18n/Dictionary/Loader/File/Csv.php +++ b/Module/I18n/Dictionary/Loader/File/Csv.php @@ -20,6 +20,6 @@ class Csv extends AbstractFile */ protected function _readFile() { - return fgetcsv($this->_fileHandler, null, ',', '"'); + return fgetcsv($this->_fileHandler, null, ',', '"', '\\'); } } diff --git a/Module/I18n/Dictionary/Writer/Csv.php b/Module/I18n/Dictionary/Writer/Csv.php index 80b38e7..ed9f86f 100755 --- a/Module/I18n/Dictionary/Writer/Csv.php +++ b/Module/I18n/Dictionary/Writer/Csv.php @@ -49,7 +49,7 @@ public function write(Phrase $phrase) $fields[] = $contextValue; } - fputcsv($this->_fileHandler, $fields); + fputcsv($this->_fileHandler, $fields, ',', '"', '\\'); } /**