[BUGFIX] Missing check if $row[t3ver_state] is set in IconUtility 52/30152/5
authorFrans Saris <franssaris@gmail.com>
Thu, 15 May 2014 20:21:57 +0000 (22:21 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sun, 18 May 2014 13:01:24 +0000 (15:01 +0200)
As a result of a missing check if $row['t3ver_state'] exists,
an exception is thrown when IconUtility::getIcon() is called
with only the required params set.

This patch adds the missing check.

Resolves: #58846
Releases: 6.2
Change-Id: I70da9ee79a5c0ee1ad4fe8892e8ed28f904a11da
Reviewed-on: https://review.typo3.org/30152
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/backend/Classes/Utility/IconUtility.php

index 2babcbb..c9e9217 100644 (file)
@@ -165,7 +165,7 @@ class IconUtility {
                // The icon is generated only if a default icon for groups is not found... So effectively this is ineffective.
                $doNotRenderUserGroupNumber = TRUE;
                // Shadow
-               if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
+               if (!empty($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && !empty($row['t3ver_state'])) {
                        switch (VersionState::cast($row['t3ver_state'])) {
                                case new VersionState(VersionState::NEW_PLACEHOLDER):
                                        return 'gfx/i/shadow_hide.png';