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

Updates CoreExtension::twig_constant to check for definition first to avoid hard crash #3769

merged 1 commit into from Dec 26, 2022


Copy link

@AMRoche AMRoche commented Nov 8, 2022

The behaviour of PHP's constant() method has been updated after php/php-src#9905 was accepted and fixed in PHP 8.1 (and previously changed post PHP 8.0) . This PR prevents a fatal error in the case a constant is supplied that doesn't actually exist.

@fabpot fabpot force-pushed the feature/constant-presence-validation branch from 497d4c2 to 56b3122 Compare December 26, 2022 12:36
Copy link

fabpot commented Dec 26, 2022

Thank you @AMRoche.

@fabpot fabpot merged commit 6c2bb9f into twigphp:2.x Dec 26, 2022
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants