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

Dump function requires html_errors to be on but doesn't allow for unset #720

Closed
zorfling opened this issue May 8, 2012 · 0 comments
Closed

Comments

@zorfling
Copy link

zorfling commented May 8, 2012

The Dump function requires html_errors to be on, otherwise it double encodes xdebug_var_dump.

There seems to be an error (or an omission really) in Twig_Extension_Debug.

Line 21 of twig/lib/Twig/Extension/Debug.php currently reads:

$isDumpOutputHtmlSafe = extension_loaded('xdebug') && (false === get_cfg_var('xdebug.overload_var_dump') || get_cfg_var('xdebug.overload_var_dump')) && get_cfg_var('html_errors');

Perhaps it should read:

$isDumpOutputHtmlSafe = extension_loaded('xdebug') && (false === get_cfg_var('xdebug.overload_var_dump') || get_cfg_var('xdebug.overload_var_dump')) && (false === get_cfg_var('html_errors') || get_cfg_var('html_errors'));

I've simply added the same unset clause as used in the overload_var_dump check.

@fabpot fabpot closed this as completed in 078905e May 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants