[BUGFIX] Prevent exception in RTE filelinks upgrade wizard 33/31933/2
authorMattias Nilsson <tollepjaer@gmail.com>
Fri, 1 Aug 2014 09:32:24 +0000 (11:32 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 1 Aug 2014 11:51:36 +0000 (13:51 +0200)
When using the upgrade wizard for RTE filelinks and the record is
not an array it throws an exception.

To give the end user a better experience an additional condition
for checking that the variable is an array is added.

Resolves: #58898
Releases: 6.3, 6.2
Change-Id: I94ae6cc7272a63fd208267bf375b629cb5a4b2cc
Reviewed-on: http://review.typo3.org/31933
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/install/Classes/Updates/RteFileLinksUpdateWizard.php

index d706552..afa2189 100644 (file)
@@ -167,7 +167,7 @@ class RteFileLinksUpdateWizard extends AbstractUpdate {
                        $reference['tablename'],
                        'uid = ' . $reference['recuid']
                );
-               if ($record !== NULL) {
+               if (is_array($record)) {
                        $this->convertFileLinks($reference, $record);
                } else {
                        // Original record could not be found (happens if sys_refindex is not up to date), issue error