[BUGFIX] Type checking at PageRepository::getFileReferences() call
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / FilesContentObject.php
index 56c0c34..e5c5f2c 100644 (file)
@@ -322,13 +322,14 @@ class FilesContentObject extends AbstractContentObject {
                        }
                }
 
                        }
                }
 
-               $references = $pageRepository->getFileReferences(
-                       $referencesForeignTable,
-                       $referencesFieldName,
-                       $element
-               );
-
-               $this->addToArray($references, $fileObjects);
+               if (is_array($element)) {
+                       $references = $pageRepository->getFileReferences(
+                               $referencesForeignTable,
+                               $referencesFieldName,
+                               $element
+                       );
+                       $this->addToArray($references, $fileObjects);
+               }
        }
 
        /**
        }
 
        /**