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

Steffen Kamper info at sk-typo3.de
Mon Oct 12 09:53:47 CEST 2009


Hi,

Martin Kutschker schrieb:
> 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).
> 

yes. There is nothing done after so the exit is right. And Masi is 
right, doing redirect and stuff after it is wrong/bad coding.

@Georg - you're right with converting redirects using t3lib_div. This 
can be done in one patch for all remainings.

vg Steffen


More information about the TYPO3-team-core mailing list