Bug #15310

PHP-Warning in shortcut-bar before DB-upgrade in 4.0beta1

Added by Ernesto Baschny over 15 years ago. Updated over 14 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


After updating the src from 3.8.1 to 4.0beta1 and just logging into the backend, I get the following warning in the alt_shortcut bar:

Warning: Invalid argument supplied for foreach() in /srv/www/shared/TYPO3core.CVS/typo3/alt_shortcut.php on line 630

because the sys_workspaces table isn't there yet.

The following patch avoids the warning.

(issue imported from #M2102)


alt_shortcut-40beta1.diff (913 Bytes) alt_shortcut-40beta1.diff Administrator Admin, 2005-12-28 11:24

Updated by Sebastian Kurfuerst over 15 years ago

this is before you ran the DB compare tool, right?

Greets, Sebastian


Updated by Sebastian Kurfuerst over 15 years ago

Just read it, I do not think this is an error as after an update, the DB compare is always needed, else stuff will break.



Updated by Ernesto Baschny over 15 years ago

Nevertheless the warning is ugly, as it can be avoided.

The cleanest way would be to force the admin that logs in to the backend of a typo3-src that has been updated to the COMPARE DB screen of the installer and not be presented with the "normal" and potentially broken backend.

Or even better: to the new "upgrade" part of the Installer, which should also do, as step 3, the "COMPARE DB" and "Write to DB".


Updated by Sebastian Kurfuerst over 15 years ago

Hi Ernesto,
I don't see how an update should be detected in the TYPO3 BE:

the upgrade wizard - this has to be run after the table compare. (Hence the numbering 2-3 in the menu). I agree that this is very un-intuitive, and I am sure the install tool is one of the major parts of TYPO3 which need to be re-written. However, this task might be done for TYPO3 4.5, but not for 4.0 release.

Greets, Sebastian
PS: Of course if you want to implement this, feel free :-)


Updated by Sebastian Kurfuerst over 15 years ago

I'll set this to "won't fix"; because the DB update is necessary in any case when doing an upgrade - it is a definite part of the upgrade procedure.
If we want to make the BE work without any table modification, this means without running the compare DB tool in the install tool, we will end up with a lot of not needed code.
Greets, Sebastian


Updated by Michael Stucki over 15 years ago

I will reopen this bug because it can be fixed pretty easy I think. Simply checking if the array has at least 1 element before running foreach() should help.


Updated by Michael Stucki over 15 years ago

Fixed in CVS.

Also available in: Atom PDF