Skip to content

Fix exception when timezone is false#4014

Merged
fabpot merged 1 commit intotwigphp:3.xfrom
Seb33300:patch-2
Apr 3, 2024
Merged

Fix exception when timezone is false#4014
fabpot merged 1 commit intotwigphp:3.xfrom
Seb33300:patch-2

Conversation

@Seb33300
Copy link
Contributor

@Seb33300 Seb33300 commented Apr 1, 2024

When passing false in the timezone param, twig returns an exception:

An exception has been thrown during the rendering of a template ("Twig\Extra\Intl\IntlExtension::createDateFormatter(): Argument 5 ($timezone) must be of type ?DateTimeZone, bool given

Passing false is supported and allows to skip the timezone conversion.

Regression introduced by #3903

@fabpot
Copy link
Contributor

fabpot commented Apr 3, 2024

Thank you @Seb33300.

@fabpot fabpot merged commit 64ee590 into twigphp:3.x Apr 3, 2024
@Seb33300 Seb33300 deleted the patch-2 branch April 17, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants