[BUGFIX] Force log_data to be an array 51/59251/4
authorIoulia Kondratovitch <ik@plan2.net>
Thu, 20 Dec 2018 21:42:19 +0000 (22:42 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Jan 2019 13:12:58 +0000 (14:12 +0100)
Ensure log_data is an array, in case it cannot be
unserialized or is not a serialized array when executing
SeparateSysHistoryFromSysLogUpdate upgrade wizard

Resolves: #87251
Releases: master, 9.5
Change-Id: I7ba7d1cb07052b236b3abb20f107c3f22210a7bf
Reviewed-on: https://review.typo3.org/59251
Reviewed-by: Martin Kutschker <martin.kutschker@ymail.com>
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/install/Classes/Updates/SeparateSysHistoryFromSysLogUpdate.php

index 96525b5..29f0503 100644 (file)
@@ -151,7 +151,7 @@ class SeparateSysHistoryFromSysLogUpdate implements UpgradeWizardInterface
             ->execute();
 
         foreach ($result as $row) {
-            $logData = unserialize($row['log_data']);
+            $logData = (array)unserialize($row['log_data']);
             $store = GeneralUtility::makeInstance(
                 RecordHistoryStore::class,
                 RecordHistoryStore::USER_BACKEND,