Fixes a PHP 8+ compatibility issue in SendPress_Data::csv_to_array().
When csv_to_array() is called without an enclosure argument, the default value is an empty string:
$enclosure = '';
This value is then passed directly to:
str_getcsv($csv_line, $delimiter, $enclosure);
PHP 8+ now throws:
ValueError: str_getcsv(): Argument #3 ($enclosure) must be a single character
because the enclosure parameter must contain exactly one character.
I created a PR with the fix: #165
Fixes a PHP 8+ compatibility issue in
SendPress_Data::csv_to_array().When
csv_to_array()is called without an enclosure argument, the default value is an empty string:$enclosure = '';This value is then passed directly to:
str_getcsv($csv_line, $delimiter, $enclosure);PHP 8+ now throws:
ValueError: str_getcsv(): Argument #3 ($enclosure) must be a single characterbecause the enclosure parameter must contain exactly one character.
I created a PR with the fix: #165