-
-
Notifications
You must be signed in to change notification settings - Fork 513
Incompatibility with PHP 7.4 caused by TWIG #2129
Copy link
Copy link
Closed
Description
Expected behavior
I had a WP website that was running perfectly on 7.1 and when moved to 7.4 a lot of whitespaces in twig templates started to disappear and break HTML everywhere around the website.
After some investigation, I found that TWIG has an issue with PHP 7.4 concerning whitespaces that got fixed with:
twigphp/Twig@1fb0f97 in 1.41.0 (2019-05-14)
Actual behavior
I expect whitespaces in twig templates to print as whitespaces in rendered HTML.
Steps to reproduce behavior
As
<header class="header {% do action('header_class') %}"></header>
Should render to:
<header class="header fixed"></header>
Instead, it is rendered as:
<header class="headerfixed"></header>
What version of WordPress, PHP and Timber are you using?
WordPress 5.2.3, PHP 7.4, Timber 1.0.5
How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)
Composer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels