From 53f1a5843446b8223294646dd33e2f429b770105 Mon Sep 17 00:00:00 2001 From: Christian Riesche Date: Thu, 29 Dec 2016 13:56:28 +0100 Subject: [PATCH] [BUGFIX] Fixed wrong Iteration in Link Migration Tool --- Classes/Command/LinkMigrationCommandController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/Command/LinkMigrationCommandController.php b/Classes/Command/LinkMigrationCommandController.php index 2fd7901..1462c1b 100644 --- a/Classes/Command/LinkMigrationCommandController.php +++ b/Classes/Command/LinkMigrationCommandController.php @@ -151,7 +151,8 @@ protected function gatherRecordsToMigrate($table, $listOfFields) // The last string is optional. If it exists, it is already a 4-part record reference, // i.e. a reference using the new syntax and which does not need to be migrated. preg_match_all('/record:(\w+):(\w+)(:\w+)?/', $record[$field], $matches); - foreach ($matches as $index => $match) { + $numberOfMatches = count ($matches[0]); + for ($index = 0; $index < $numberOfMatches; $index++) { // Consider only matches that have 3 parts (i.e. 4th part is empty) // NOTE: although not captured, the first part is "record:" if ($matches[3][$index] === '') {