On 20.01.2011, at 10:01, Lukas Kahwe Smith wrote:
>
> On 20.01.2011, at 09:55, Fabien Potencier wrote:
>
>>
>> On 1/20/11 9:45 AM, Lukas Kahwe Smith wrote:
>>> Hi,
>>>
>>> In the spirit of ESI we have moved a few things into separate controller
>>> actions. However if serious errors happen in such subrequests, they cause
>>> all sorts of breakage in twig, which prevents the exception from bubbling
>>> up.
>>>
>>> This issue seems to be caused in Twig_Template by where ob_end_clean()
>>> causes an error:
>>>
>>> public function render(array $context)
>>> {
>>> ob_start();
>>> try {
>>> $this->display($context);
>>> } catch (Exception $e) {
>>> ob_end_clean();
>>>
>>> throw $e;
>>> }
>>>
>>> return ob_get_clean();
>>> }
>>
>> Can you explain the problems you have? The ob_end_clean() just clears the
>> output buffering so that nothing is outputted in case of an error.
>
>
> You can reproduce the issue:
> 1) clear your cache
> 2) throw an exception inside an action that is rendered inside another twig
> template
> {% render "fooController:throwExceptionAction" %}
> 3) this will give you Notice: ob_end_clean() [ref.outcontrol]: failed to
> delete buffer. No buffer to delete in
> /Users/lsmith/htdocs/liip/src/vendor/twig/lib/Twig/Template.php on line 172
> 4) refresh and then you get the error inside the generated classes file:
> Notice: ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer
> to delete in /Users/lsmith/htdocs/liip/app/main/cache/dev/classes-4bf70.php
> on line 2839
this issue still exist :-/
removing the ob_end_clean(); solves the issue for me ..
regards,
Lukas Kahwe Smith
[email protected]
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en