[TYPO3-core] RFC #- buffer output for debug function

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sun Nov 25 14:20:33 CET 2007


Ingo Renner schrieb:
> Steffen Kamper wrote:
>> "Ingo Renner" <ingo at typo3.org> schrieb im Newsbeitrag 
>> news:mailman.1.1195995000.6080.typo3-team-core at lists.netfielders.de...
>>> Steffen Kamper wrote:
>>>> Hi,
>>>>
>>>> Type: cleanup
>>>>
>>>> Branches:
>>>> Trunk
>>>>
>>>> Problem
>>>> one not very nice with t3lib_div::debug is that output is printed 
>>>> direct with echo. This causes error "header already sent..."
>>>>
>>>> Solution
>>>> simply start debug-function with ob_start();
>>> I don't know whether we really need that, as it is a _debug_ function 
>>> (not to be used in production environments) I don't care for a header 
>>> warning if it's caused by that. +-0 or -0.5 from me.
>>>
>>>
>>> Ingo
>>>
>>> -- 
>>> Ingo Renner
>>> TYPO3 Core Developer, Release Manager TYPO3 4.2
>>
>> Hi Ingo,
>>
>> one reason is the error-message
>> second one is that headers are not sent so in some cases page render 
>> stops while debug.
> 
> but then you could go with
> 
> ob_start();
> debug($myVar);

But it's more convenient if the debug function handles that for you. Now 
even with a check for active buffering.

Masi


More information about the TYPO3-team-core mailing list