[TYPO3-core] RFC #- buffer output for debug function
Steffen Kamper
steffen at sk-typo3.de
Sun Nov 25 14:08:05 CET 2007
sry, typo in patch - i attached a corercted one.
vg Steffen
"Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag
news:mailman.1.1195995225.21864.typo3-team-core at lists.netfielders.de...
> 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;"@I/3TP*2!["BL)"0EO8E]S=&%R="@I.PHK"0E]"BL*( D)
M:68@*"1B<D]R2&5A9&5R("8F("%T,VQI8E]D:78Z.G1E<W1);G0H)&)R3W)(
M96%D97(I*0E["B )"0EE8VAO("<\=&%B;&4 at 8VQA<W,](G1Y<&\S+61E8G5G
M(B!B;W)D97(](C B(&-E;&QP861D:6YG/2(P(B!C96QL<W!A8VEN9STB,"(@
M8F=C;VQO<CTB=VAI=&4B('-T>6QE/2)B;W)D97(Z,'!X.R!M87)G:6XM=&]P
M.C-P>#L@;6%R9VEN+6)O='1O;3HS<'@[(CX\='(^/'1D('-T>6QE/2)B86-K
M9W)O=6YD+6-O;&]R.B-B8F)B8F([(&9O;G0M9F%M:6QY.B!V97)D86YA+&%R
M:6%L.R!F;VYT+7=E:6=H=#H at 8F]L9#L at 9F]N="US:7IE.B Q,'!X.R(^)RYH
M=&UL<W!E8VEA;&-H87)S*"AS=')I;F<I)&)R3W)(96%D97(I+B<\+W1D/CPO
L='(^/'1R/CQT9#XG.PH@"0E](&5L<V5I9B H)&)R3W)(96%D97(\,"D)>PH`
`
end
More information about the TYPO3-team-core
mailing list