Skip to content
Snippets Groups Projects
Commit 4869cbd1 authored by Nicole Cordes's avatar Nicole Cordes Committed by Helmut Hummel
Browse files

[BUGFIX] Prevent warning in Upgrade Wizard

The ReferenceIntegrityUpdateWizard looks for existing FAL file references.
If you start the Upgrade Wizard without any database update before, FAL
tables don't exists yet and the database request returns a non array
value. As the Wizard expects an array to be returned without proper
casting, a warning is thrown.

Releases: 6.2
Resolves: #65159
Change-Id: Ib4e6c308d1e2de8e7f7e2523d62a4ff97ef47bb5
Reviewed-on: http://review.typo3.org/37012


Reviewed-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: default avatarNicole Cordes <typo3@cordes.co>
Tested-by: default avatarNicole Cordes <typo3@cordes.co>
Reviewed-by: default avatarStephan Großberndt <stephan@grossberndt.de>
Tested-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
parent 8f3a5633
No related branches found
No related tags found
No related merge requests found
......@@ -119,14 +119,20 @@ class ReferenceIntegrityUpdateWizard extends AbstractUpdate {
/**
* Fetches a list of all sys_file_references that have PID=0
*
* @return mixed
* @return array
*/
protected function getFileReferencesOnRootlevel() {
return $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
$fileReferences = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'uid, pid, uid_local AS fileuid, uid_foreign AS targetuid, tablenames AS targettable',
'sys_file_reference',
'pid=0 AND deleted=0'
);
if (!is_array($fileReferences)) {
// An SQL error occurred, most likely because the sys_file_reference table is not there.
// We ignore this here to avoid a warning when initially showing the upgrade wizard (see #65159).
return array();
}
return $fileReferences;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment