From c025ea9b0d76b0ac680a99b9947681e130eefb85 Mon Sep 17 00:00:00 2001 From: Alexander Pirsig Date: Tue, 24 Jul 2012 16:31:51 +0300 Subject: [PATCH] Fixing call to undefined methode --- Type/CaptchaType.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Type/CaptchaType.php b/Type/CaptchaType.php index c138dbf..2d5be9d 100644 --- a/Type/CaptchaType.php +++ b/Type/CaptchaType.php @@ -81,12 +81,16 @@ class CaptchaType extends AbstractType $this->session->set($this->key.'_fingerprint', $generator->getFingerprint()); } - $view->addVars(array( + $fieldVars = array( 'captcha_width' => $options['width'], 'captcha_height' => $options['height'], 'captcha_code' => $captchaCode, 'value' => '', - )); + ); + + foreach($fieldVars as $name => $value){ + $view->set($name,$value); + } } public function setDefaultOptions(OptionsResolverInterface $resolver)