Warning in code - Help appreciated

by BC27
2 replies
This is the warning:

Warning: trim() expects parameter 1 to be string, array given in "file"on line 152

This is Line 152:

$selected = ( trim( $option ) == trim( $submitted_value ) || ( $is_multiselect && in_array( trim( $option ), $submitted_value ) ) ) ? 'selected="selected"' : '';

I'd appreciate any help, Thanks.
#appreciated #code #warning
  • Profile picture of the author Xorb
    $option or $submitted_value is an array rather then a string value. You may want to just try dumping those variables and seeing what the issue is.
    {{ DiscussionBoard.errors[10075514].message }}
    • Profile picture of the author BC27
      Thanks Xorb,

      Couldn't figure it out. Looks like the Multiple Selection Box has an issue. Made a new form without it. Will just have to do.

      I appreciate the help.
      {{ DiscussionBoard.errors[10076188].message }}

Trending Topics