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

Steffen Kamper steffen at sk-typo3.de
Sun Nov 25 13:54:37 CET 2007


Hi,

i followed your suggestion and made a new patch with checking of buffer 
start

vg  Steffen

"Ingmar Schlecht" <ingmar at typo3.org> schrieb im Newsbeitrag 
news:mailman.1.1195993142.12731.typo3-team-core at lists.netfielders.de...
> Martin Kutschker schrieb:
>> Ingmar Schlecht schrieb:
>>> Martin Kutschker schrieb:
>>>> Ingmar Schlecht schrieb:
>>>>> Hi Steffen,
>>>>>
>>>>> this RFC has no corresponding bug report. Please add it, so that we 
>>>>> can
>>>>> properly track the changes.
>>>>>
>>>>> +1 based on reading the code and the ob_start() documentation.
>>>> Did you notice the stackability of those buffers? Starting a new output
>>>> buffer by calling debug() might result in unexpected behaviour for 
>>>> other
>>>> code using buffers.
>>>
>>> I don't think so, because if someone does an
>>>   ob_start()
>>>   and some time later an
>>>   ob_get_contents()
>>> the behavior of the stack is not different if we would've done an
>>> additional ob_start() at the very beginning which is flushed
>>> automatically at the very end.
>>>
>>> The only problem occurs if someone uses debug() *inside* a stacked OB,
>>> but that problem could be fixed by checking if we're inside any OBing
>>> when debug() is executed. Steffen, could you add that check to your
>>> patch?
>>
>> You mean?
>>
>> if (ob_get_level==0) {
>>  ob_start();
>> }
>
> Yep.
>
>> I think this is ok (+1). Perhaps this can even be added to 4.1 as the
>> PHP error is more a bug than a mising feature.
>
> Fine with me.
>
> cheers
> Ingmar
>
> -- 
> Ingmar Schlecht
> TYPO3 Association Active Member 


begin 666 20071125_debug_buffering2.diff
M26YD97 at Z('0S;&EB+V-L87-S+G0S;&EB7V1I=BYP:' -"CT]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T-"BTM+2!T,VQI8B]C;&%S<RYT,VQI8E]D:78N<&AP"2AR
M979I<VEO;B R-S8V*0T**RLK('0S;&EB+V-L87-S+G0S;&EB7V1I=BYP:' )
M*'=O<FMI;F<@8V]P>2D-"D! ("TR.3 R+#8@*S(Y,#(L,3$@0$ -"B )("H@
M0')E='5R;@EV;VED"B )("HO"B )9G5N8W1I;VX at 9&5B=6<H)'9A<CTG)RPD
M8G)/<DAE861E<CTP*0E["BL)"0DO+R!B=69F97(@=&AE(&]U='!U="!O9B!D
M96)U9R!I9B!N;R!B=69F97)I;F<@<W1A<G1E9"!B969O<F4**PD):68@*&]B
M7V=E=%]L979E;#T],"D@>PHK"0D);V)?<W1A<G0H*3L**PD)?0HK"B )"6EF
M("@D8G)/<DAE861E<B F)B A=#-L:6)?9&EV.CIT97-T26YT*"1B<D]R2&5A
M9&5R*2D)>PH@"0D)96-H;R G/'1A8FQE(&-L87-S/2)T>7!O,RUD96)U9R(@
M8F]R9&5R/2(P(B!C96QL<&%D9&EN9STB,"(@8V5L;'-P86-I;F<](C B(&)G
M8V]L;W(](G=H:71E(B!S='EL93TB8F]R9&5R.C!P>#L@;6%R9VEN+71O<#HS
M<'@[(&UA<F=I;BUB;W1T;VTZ,W!X.R(^/'1R/CQT9"!S='EL93TB8F%C:V=R
M;W5N9"UC;VQO<CHC8F)B8F)B.R!F;VYT+69A;6EL>3H@=F5R9&%N82QA<FEA
M;#L at 9F]N="UW96EG:'0Z(&)O;&0[(&9O;G0M<VEZ93H@,3!P>#LB/B<N:'1M
M;'-P96-I86QC:&%R<R at H<W1R:6YG*21B<D]R2&5A9&5R*2XG/"]T9#X\+W1R
J/CQT<CX\=&0^)SL*( D)?2!E;'-E:68@*"1B<D]R2&5A9&5R/# I"7L*
`
end



More information about the TYPO3-team-core mailing list