Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

HonzaMatosik opened this issue Feb 10, 2021 · 0 comments


Copy link

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}

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.

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

No branches or pull requests

2 participants