[BUGFIX] Image viewhelper clears $GLOBALS['TSFE'] in backend context
authorStefan Froemken <froemken@gmail.com>
Fri, 30 Nov 2012 20:41:59 +0000 (21:41 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Sun, 2 Dec 2012 09:48:33 +0000 (10:48 +0100)
commitd0867f6f90d3e518cb696fda161a5c6fa936ab03
treea21b8362c7480177f993611debb784e0089df076
parent739d67a155bd5b53d20b8b84d6333c04349322eb
[BUGFIX] Image viewhelper clears $GLOBALS['TSFE'] in backend context

The image viewhelper replaces the $GLOBALS['TSFE'] array to
simulateFrontendEnvironment if it is called in backend context.
After successful get of the image, it restores the TSFE.

But in case, that the requested image has not been found,
it throws an Tx_Fluid_Core_ViewHelper_Exception, which means
that the TSFE get not restored. This causes errors when other
code tries to access TSFE after the image viewhelper has been
executed.

Resolves: #43446
Releases: 4.5, 4.6, 4.7, 6.0

Change-Id: Ic5b1fc73c74ffa7fca6e36c6f42e3f2084efa7c8
Reviewed-on: http://review.typo3.org/16933
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php