From 45eebd7101d36e53e54c8c924cfa493409685a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Sun, 29 Sep 2024 15:33:17 +0200 Subject: [PATCH] [TASK] Explicitly provide all `fgetcsv()` arguments With [1] the 5th parameter `$escape` of `fgetcsv()` must be provided either positional or using named arguments or a E_DEPRECATED will be emitted since `PHP 8.4.0 RC1` [2]. This change provide now all five parameter for `fgetcsv()` calls and thus using the positional approach to allow easier backporting to older TYPO3 version where named arguements are not usable. [1] https://github.com/php/php-src/pull/15569 [2] https://github.com/php/php-src/blob/ebee8df27ed/UPGRADING#L617-L622 Releases: main, 8, 7 --- Classes/Core/Functional/Framework/DataHandling/DataSet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Core/Functional/Framework/DataHandling/DataSet.php b/Classes/Core/Functional/Framework/DataHandling/DataSet.php index c2a505b4..358bd9ab 100644 --- a/Classes/Core/Functional/Framework/DataHandling/DataSet.php +++ b/Classes/Core/Functional/Framework/DataHandling/DataSet.php @@ -63,7 +63,7 @@ protected static function readData(string $fileName): array // BOM not found - rewind pointer to start of file. rewind($fileHandle); } - while (!feof($fileHandle) && ($values = fgetcsv($fileHandle, 0)) !== false) { + while (!feof($fileHandle) && ($values = fgetcsv($fileHandle, 0, ',', '"', '\\')) !== false) { $rawData[] = $values; } fclose($fileHandle);