[BUGFIX] Don't rely on not found database records impexp
[Packages/TYPO3.CMS.git] / typo3 / sysext / impexp / Classes / ImportExport.php
index bce1660..815b269 100644 (file)
@@ -1924,7 +1924,9 @@ class ImportExport {
                                                'sys_file_metadata',
                                                'file = ' . $this->import_mapId['sys_file'][$record['file']] . ' AND sys_language_uid = 0 AND pid = 0'
                                        );
-                                       if ($recordInDatabase !== NULL) {
+                                       // if no record could be found, $this->import_mapId['sys_file'][$record['file']] is pointing
+                                       // to a file, that was already there, thus a new metadata record should be created
+                                       if (is_array($recordInDatabase)) {
                                                $this->import_mapId['sys_file_metadata'][$record['uid']] = $recordInDatabase['uid'];
                                                $ID = $recordInDatabase['uid'];
                                        } else {