[TYPO3-core] RFC #17725 Cleanup: Wrong check for FE / BE context in class.t3lib_tstemplate.php

Steffen Kamper info at sk-typo3.de
Thu Feb 24 17:48:45 CET 2011


Hi,

Am 24.02.2011 15:33, schrieb Ernesto Baschny [cron IT]:
> Any way to reproduce this particular bug? To me its not a "no brainer"
> if I cannot see what will be fixed with this change. :)
>
> E.g. I can imagine that I could have a $GLOBALS['TSFE'] also in BE
> context, and your change would break this situation (just a thought).
>

there may be a TSFE helper object in BE, but not from core. And even if 
there is one, the next line could break.

This looks like the typical way to differ between FE and BE (as the 
comment also say), so TYPO3_MODE is the correct way to check this - and 
this is safe, as first line will work always in FE, second always in BE.

 From this point i agree to the patch, +1 by reading.

vg Steffen


More information about the TYPO3-team-core mailing list