Skip to content
Snippets Groups Projects
Commit 34e43a99 authored by Alex Pott's avatar Alex Pott Committed by Andrey Postnikov
Browse files

keep only mail eascaped for follow-up #3471494

parent 77a16a56
No related branches found
No related tags found
1 merge request!9649Fix usage of str_getcsv() and fgetcsv() for PHP 8.4 #3477324
......@@ -125,7 +125,7 @@ public function testMigrationState(): void {
// Assert that each discovered migration has a corresponding declaration
// in a migrate_drupal.yml.
foreach ($discovered_unique as $datum) {
$data = str_getcsv($datum, escape: '\\');
$data = str_getcsv($datum, escape: '');
$in_finished = in_array($datum, $declared_unique[MigrationState::FINISHED]);
$in_not_finished = in_array($datum, $declared_unique[MigrationState::NOT_FINISHED]);
$found = $in_finished || $in_not_finished;
......@@ -137,7 +137,7 @@ public function testMigrationState(): void {
// not finished.
$discovered_not_finished = array_diff($discovered_unique, $declared_unique[MigrationState::FINISHED]);
foreach ($discovered_not_finished as $datum) {
$data = str_getcsv($datum, escape: '\\');
$data = str_getcsv($datum, escape: '');
$this->assertContains($datum, $declared_unique[MigrationState::NOT_FINISHED], sprintf("No migration found for version '%s' with source_module '%s' and destination_module '%s' declared in module '%s'", $version, $data[1], $data[2], $data[0]));
}
}
......
......@@ -184,9 +184,9 @@ protected function readMultilingualContent($filename) {
foreach ($translated_languages as $language) {
if (file_exists($default_content_path . "$language/$filename") &&
($handle = fopen($default_content_path . "$language/$filename", 'r')) !== FALSE) {
$header = fgetcsv($handle, escape: '\\');
$header = fgetcsv($handle, escape: '');
$line_counter = 0;
while (($content = fgetcsv($handle, escape: '\\')) !== FALSE) {
while (($content = fgetcsv($handle, escape: '')) !== FALSE) {
$keyed_content[$language][$line_counter] = array_combine($header, $content);
$line_counter++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment