[BUGFIX] L10nModeUpdater: Cast parentId to integer 57/51757/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sun, 19 Feb 2017 18:09:28 +0000 (19:09 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 20 Feb 2017 08:00:11 +0000 (09:00 +0100)
To prevent PHP errors in L10nModeUpdater caused by faulty extensions
whose `transOrigPointerField` field is not an integer, the parentId is
now always cast to an int.

Resolves: #79824
Releases: master
Change-Id: I238b89b6fec476731f16807125eb89e9198f50c4
Reviewed-on: https://review.typo3.org/51757
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/install/Classes/Updates/RowUpdater/L10nModeUpdater.php

index 16a6736..e01e9c2 100644 (file)
@@ -315,7 +315,7 @@ class L10nModeUpdater implements RowUpdaterInterface
 
         foreach ($statement as $row) {
             $translationId = $row['uid'];
-            $parentId = $row[$parentFieldName];
+            $parentId = (int)$row[$parentFieldName];
             $payload['localizations'][$translationId] = $parentId;
         }
         if (!empty($payload['localizations'])) {