Looking at web_debug I can see the parameter holder is wrong:

parameterHolder:
  action: index
  module: review
  review: { id: '', purpose_id: '2', other_purpose: '',
review_audiences_list: ['true', 'true'], rating_room: '5',
rating..............

Now I'm thinking it's a bug on request objects.. What do you think?

I'm using the doctrine 1.3.4

nei



On 20 set, 12:18, Nei Rauni Santos <nra...@gmail.com> wrote:
> Hi, guys,
>
> I'm having some problems today with a customer who use thunderbrowse
> plugin to thunderbird, my problem is that I'm using doctrineChoice to
> render some options like this:
>
> $widgets['review_audiences_list'] = new
> sfWidgetFormDoctrineChoice(array('multiple' => true,
>       'expanded' => true, 'model' => 'ReviewAudience', 'order_by' =>
> array('weight', 'asc') ));
>
> And it's rendering normal, like this
>
> <input name="review[review_audiences_list][]" type="checkbox"
> value="2" id="review_review_audiences_list_2" />
> <input name="review[review_audiences_list][]" type="checkbox"
> value="3" id="review_review_audiences_list_3" />
> <input name="review[review_audiences_list][]" type="checkbox"
> value="4" id="review_review_audiences_list_4" />
>
> the problem is that this browse post send this values as boolean and
> not integer.
>
> I put on var_dump on my action before $form->save()
>
> if( $request->isMethod('post') ){
>       $review = $request->getParameter('review');
>
>  echo "<pre>";
> var_dump( $_POST );
> var_dump( $review );
> exit;
>
> and I notice this browse send the value like this:
>
> POST:
>  ["review_audiences_list"]=>
>     array(2) {
>       [0]=>
>       string(4) "true"
>       [1]=>
>       string(4) "true"
>     }
>
> and the review array is ok:
>
>   ["review_audiences_list"]=>
>   array(2) {
>     [0]=>
>     string(4) "true"
>     [1]=>
>     string(4) "true"
>   }
>
> So, I'm getting this erro: "SQLSTATE[22P02]: Invalid text
> representation: 7 ERROR: invalid input syntax for integer: "true""
> because doctrineChoice try to get objects using this boolean and not
> the id.
>
> Any idea about it?
>
> It's happening before the bind, so it could be the $request-
>
>
>
>
>
>
>
> >getParameter?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to