From b0745fde213d5ef771c7ba8820f81ca387fd7dcb 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 283db6ec..77f0c0b5 100644 --- a/Classes/Core/Functional/Framework/DataHandling/DataSet.php +++ b/Classes/Core/Functional/Framework/DataHandling/DataSet.php @@ -186,7 +186,7 @@ private 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);