MDL-83335 core: Explicitly specify escape with fgetcsv/fputcsv

PHP 8.4 requires that a value be provided for the `$escape` parameter to
both `fgetcsv()` and `fputcsv()`.
This commit is contained in:
Andrew Nicols
2024-10-02 09:10:50 +08:00
parent ab5692acdf
commit b29615a6f0
9 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -85,9 +85,9 @@ if ($options['replace']) {
$results = $urlfinder->http_link_stats();
asort($results);
$fp = fopen('php://stdout', 'w');
fputcsv($fp, ['clientsite', 'httpdomain', 'urlcount']);
fputcsv($fp, ['clientsite', 'httpdomain', 'urlcount'], escape: '\\');
foreach ($results as $domain => $count) {
fputcsv($fp, [$SITE->shortname, $domain, $count]);
fputcsv($fp, [$SITE->shortname, $domain, $count], escape: '\\');
}
fclose($fp);
}