Skip to content

Fix exception when timezone is false#11

Closed
Seb33300 wants to merge 1 commit intotwigphp:3.xfrom
Seb33300:patch-1
Closed

Fix exception when timezone is false#11
Seb33300 wants to merge 1 commit intotwigphp:3.xfrom
Seb33300:patch-1

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.

@Seb33300
Copy link
Contributor Author

Seb33300 commented Apr 2, 2024

PR created here: twigphp/Twig#4014

@Seb33300 Seb33300 closed this Apr 2, 2024
@Seb33300 Seb33300 deleted the patch-1 branch April 2, 2024 02:27
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.

1 participant