Skip to content

Commit 8e19e2c

Browse files
committed
bug symfony#20882 [TwigBridge] fix constructor args check (xabbuh)
This PR was merged into the 3.2 branch. Discussion ---------- [TwigBridge] fix constructor args check | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony-docs#7242 | License | MIT | Doc PR | Commits ------- fa82588 [TwigBridge] fix constructor args check
2 parents d93024b + fa82588 commit 8e19e2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/Extension/FormExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FormExtension extends \Twig_Extension implements \Twig_Extension_InitRunti
3131

3232
public function __construct($renderer = null)
3333
{
34-
if ($this->renderer instanceof TwigRendererInterface) {
34+
if ($renderer instanceof TwigRendererInterface) {
3535
@trigger_error(sprintf('Passing a Twig Form Renderer to the "%s" constructor is deprecated since version 3.2 and won\'t be possible in 4.0. Pass the Twig_Environment to the TwigRendererEngine constructor instead.', static::class), E_USER_DEPRECATED);
3636
} elseif (null !== $renderer && !(is_array($renderer) && isset($renderer[0], $renderer[1]) && $renderer[0] instanceof ContainerInterface)) {
3737
throw new \InvalidArgumentException(sprintf('Passing any arguments the constructor of %s is reserved for internal use.', __CLASS__));

0 commit comments

Comments
 (0)