[TYPO3-core] RFC #12186: EM sends Location-header without exit

Martin Kutschker masi-no at spam-typo3.org
Mon Oct 12 09:32:16 CEST 2009


Ernesto Baschny [cron IT] schrieb:
> Steffen Kamper schrieb:
>> Hi,
>>
>> committed this nobrainer to trunk, rev 6140
>>
>> vg Steffen
> 
> I haven't really looked at the patch, but doing an early exit() is not
> really a "no-brainer". It could be that the PHP script needs to execute
> "something" at the end of it, like saving the session, closing stuff or
> writing something to the DB.

Yes, but that would be a very confusing way to code it. Writing a redirect header is usually
followed by an exit(). It's much easier to read if the redirect is the very last statement. If this
cannot be done in the program flow I think a comment is warranted that explains why an exit() at
that point is not possible (and where it happens).

Masi


More information about the TYPO3-team-core mailing list