Skip to content

Commit

Permalink
[TASK] Explicitly provide all fgetcsv() arguments
Browse files Browse the repository at this point in the history
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] php/php-src#15569
[2] https://github.com/php/php-src/blob/ebee8df27ed/UPGRADING#L617-L622

Releases: main, 8, 7
  • Loading branch information
sbuerk committed Sep 29, 2024
1 parent 76acb9c commit 45eebd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Core/Functional/Framework/DataHandling/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 45eebd7

Please sign in to comment.