Skip to content

Output is buferred when exception is thrown inside {capture} tag #260

Description

@HonzaMatosik

Version: 2.10.*

Bug Description

When exception is thrown inside {capture} tag, ob_get_clean isn't called and all output is captured.
Related with: 075604d

Steps To Reproduce

Create exception inside {capture} tag:

{capture $foo}
	{$bar->undefinedMethod()}
{/capture}

This will compile to php code:

ob_start(function () {});
echo '	';
echo LR\Filters::escapeHtmlText($bar->undefinedMethod()) /* line 2 */;
echo "\n";
$ʟ_fi = new LR\FilterInfo('html');
$foo = ob_get_length() ? new LR\Html(ob_get_clean()) : ob_get_clean();

And once exception is thrown, then output is bufferred and no data are send.

Expected Behavior

End output buffering in case of error, to allow output (like error page) to render.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions