[BUGFIX] Cast database result uid to int 47/57247/2
authorSusanne Moog <susanne.moog@typo3.org>
Sun, 17 Jun 2018 14:45:10 +0000 (16:45 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 19 Jun 2018 10:48:34 +0000 (12:48 +0200)
As the OrphanRecordsCommand is using strict types
the results in row['uid'] has been casted to int
before usage in further methods as it is returned
as string from the database.

Resolves: #85288
Releases: master
Change-Id: Ia7a8f0f2be37b4b35a246f95049e20d717cbf767
Reviewed-on: https://review.typo3.org/57247
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php

index bccab3a..5671fc5 100644 (file)
@@ -211,7 +211,7 @@ Manual repair suggestions:
                 ->execute();
 
             while ($row = $result->fetch()) {
-                $allRecords = $this->findAllConnectedRecordsInPage($row['uid'], $depth, $allRecords);
+                $allRecords = $this->findAllConnectedRecordsInPage((int)$row['uid'], $depth, $allRecords);
             }
         }
 
@@ -221,7 +221,7 @@ Manual repair suggestions:
             if (is_array($versions)) {
                 foreach ($versions as $verRec) {
                     if (!$verRec['_CURRENT_VERSION']) {
-                        $allRecords = $this->findAllConnectedRecordsInPage($verRec['uid'], $depth, $allRecords);
+                        $allRecords = $this->findAllConnectedRecordsInPage((int)$verRec['uid'], $depth, $allRecords);
                     }
                 }
             }