Checkboxlist Throws "array To String Conversion"

Im tryin to create a checkBoxList which depends on model data, so i basically added this line to my view


<?php echo $form->checkBoxList($model,'name', CHtml::listData(Places::model()->findAll(),'name','name')); ?> 

and Im gettin an exception like


Array to string conversion

Due to the doc. I just have to provide an string array, so I cant figure out, whats goin on here

Thanks in advance

First of all, try to replace CHtml::listData(Places::model()->findAll(),‘name’,‘name’) by some test array, like array(‘key1’ => ‘val1’, ‘key2’ => ‘val2’)

If error is gone, something is wrong with your Places::name attribute (maybe you’ve defined a getter for it or something like this).

Already tried it and it works. I echo listData aswell - its a normal array with key => value so I dont know where the problem is…

What version of Yii?