[FOLLOWUP][BUGFIX] Prevent wrong ref_index for fields with soft references 54/37554/2
authorNicole Cordes <typo3@cordes.co>
Tue, 3 Mar 2015 21:46:03 +0000 (22:46 +0100)
committerNicole Cordes <typo3@cordes.co>
Thu, 5 Mar 2015 11:57:27 +0000 (12:57 +0100)
Prevent problems with NULL values in reference fields.

Releases: master, 6.2
Resolves: #60226
Change-Id: I168e508ca9d47a3047a7b11bed0c315186ff2e2a
Reviewed-on: http://review.typo3.org/37554
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Database/ReferenceIndex.php

index 44e2a16..08ff666 100644 (file)
@@ -750,7 +750,7 @@ class ReferenceIndex {
                                );
                        }
                        return $fileArray;
-               } elseif ($conf['type'] == 'input' && isset($conf['wizards']['link']) && GeneralUtility::isFirstPartOfStr($value, 'file:')) {
+               } elseif ($conf['type'] == 'input' && isset($conf['wizards']['link']) && $value !== NULL && GeneralUtility::isFirstPartOfStr($value, 'file:')) {
                        try {
                                $file = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($value);
                        } catch (\Exception $e) {