Yii Framework Forum: CForm in Yii 1.1.1 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CForm in Yii 1.1.1 attribute "class" Rate Topic: -----

#1 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 14 March 2010 - 05:34 AM

Hi,

I've just migrated to Yii 1.1.1 from Yii 1.1.0 and got a problem with CForm.

Yii 1.1.0 code:

$config = array(
    'attributes'=>array(
        'class'=>'document',
     ),

    'showErrorSummary'=>true,

    'elements'=>$elements,

    'buttons'=>array(
        'document'=>array(
            'type'=>'submit',
            'label'=>'Save',
        ),
    ),

Same Yii 1.1.1 code will cause an exception:

Quote

Fatal error: Method CForm::__toString() must not throw an exception in ...


If I delete "class" attribute, then everything works fine. So, am I missing something? And how should I set form's class attribute?
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,428
  • Joined: 17-January 09
  • Location:Russia

Posted 14 March 2010 - 07:02 AM

Looks like an issue. Please fill a report here: http://code.google.c...yii/issues/list
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users