mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-04 10:11:26 +01:00
fix PHP 8.4 ValueError: str_getcsv(): Argument #4 ($escape) must be empty or a single character
This commit is contained in:
parent
595c93f3ba
commit
700afc2da7
@ -775,14 +775,14 @@ class Backup
|
||||
{
|
||||
if (function_exists('str_getcsv')) // php5.3+
|
||||
{
|
||||
// we need to take care of literal "NULL" values, replacing them we a special token as str_getcsv removes enclosures around strings
|
||||
// we need to take care of literal "NULL" values, replacing them with a special token as str_getcsv removes enclosures around strings
|
||||
// str_getcsv uses '""' for '"' instead of '\\"' and does not unescape '\\n', '\\r' or '\\\\' (two backslashes)
|
||||
$fields = str_getcsv(strtr($line, array(
|
||||
'"NULL"' => self::NULL_TOKEN,
|
||||
'\\\\' => self::BACKSLASH_TOKEN,
|
||||
'\\"' => '""',
|
||||
'\\n' => "\n",
|
||||
'\\r' => "\r")), ',', '"', '\0');
|
||||
'\\r' => "\r")), ',', '"');
|
||||
// replace NULL-token again with 'NULL', 'NULL' with null and BACKSLASH-token with a backslash
|
||||
foreach($fields as &$field)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user