Fatal Error when adding captcha with Form Builder

When trying to add captcha to the form builder the following error occures:

Fatal error: Method CForm::__toString() must not throw an exception in \protected\views\site\register.php on line 4

On line 4 is:

<?php echo $form; ?>


return array(




        'title'=&gt;'Login information',





            Yii::app()-&gt;controller-&gt;widget(&quot;CCaptcha&quot;, array(), true),

            'capatcha' =&gt; array('type'=&gt;'text')

                'label' =&gt; Yii::t('form', 'Insert verification code'),

                'type' =&gt; 'text',














public function rules()


    return array(

        array('username, password, email', 'required'),

        array('username, password, email', 'length', 'max' =&gt; 128),

        array('email', 'email'),

        array('email', 'unique'),

        array('username', 'unique'),

        array('username, email', 'safe', 'on' =&gt; 'search'),

        array('capatcha', 'captcha', 'allowEmpty'=&gt;&#33;extension_loaded('gd'))



I’ve temporarily solved my problem by adding

public $captcha;

to the User model