[BUGFIX] EXT:install: Upgrade wizard sys_file_processedfile no longer failed 69/44469/3
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 1 Nov 2015 09:46:08 +0000 (10:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 3 Nov 2015 22:31:48 +0000 (23:31 +0100)
The upgrade wizard failed if a storage driver was unavailable.

Resolves: #71235
Releases: master
Change-Id: I6af24a212bbb795ca386a5b7da5330ceb1b0f6fd
Reviewed-on: https://review.typo3.org/44469
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/Updates/ProcessedFileChecksumUpdate.php

index 0143bde..214ea9f 100644 (file)
@@ -73,7 +73,11 @@ This can either happen on demand, when the processed file is first needed, or by
         $join = 'sys_file_processedfile LEFT JOIN sys_registry ON entry_key = CAST(sys_file_processedfile.uid AS CHAR) AND entry_namespace = \'ProcessedFileChecksumUpdate\'';
         $res = $db->exec_SELECTquery('sys_file_processedfile.*', $join, 'entry_key IS NULL AND sys_file_processedfile.identifier <> \'\'');
         while ($processedFileRow = $db->sql_fetch_assoc($res)) {
-            $storage = $factory->getStorageObject($processedFileRow['storage']);
+            try {
+                $storage = $factory->getStorageObject($processedFileRow['storage']);
+            } catch (\InvalidArgumentException $e) {
+                $storage = null;
+            }
             if (!$storage) {
                 // invalid storage, delete record, we can't take care of the associated file
                 $db->exec_DELETEquery('sys_file_processedfile', 'uid=' . $processedFileRow['uid']);