Skip to content

Commit

Permalink
Fix compat with PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 15, 2024
1 parent 11511e1 commit f6fe2dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Node/Expression/CallExpression.php
Expand Up @@ -37,7 +37,7 @@ protected function compileCallable(Compiler $compiler)
} else {
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
}
} elseif (\is_array($callable) && $callable[0] instanceof ExtensionInterface) {
} elseif (\is_array($callable) && $callable[0] instanceof ExtensionInterface && false === strpos($callable[1], 'closure:')) {
$class = \get_class($callable[0]);
if (!$compiler->getEnvironment()->hasExtension($class)) {
// Compile a non-optimized call to trigger a \Twig\Error\RuntimeError, which cannot be a compile-time error
Expand Down

0 comments on commit f6fe2dc

Please sign in to comment.