Skip to content

Commit

Permalink
Used Php8 Construct But Still Need to Support 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
oleibman committed Sep 6, 2024
1 parent 7551a9f commit e69cfb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PhpSpreadsheet/Reader/Csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,14 +649,16 @@ public function getPreserveNullString(): bool
* as escape Character.
*
* @param resource $stream
*
* @return array|false
*/
private static function getCsv(
$stream,
?int $length = null,
string $separator = ",",
string $enclosure = "\"",
string $escape = "\\"
): array|false {
) {
if (PHP_VERSION_ID >= 80400 && $escape !== '') {
return @fgetcsv($stream, $length, $separator, $enclosure, $escape);
}
Expand Down

0 comments on commit e69cfb9

Please sign in to comment.