Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Warning in code - Help appreciated (https://www.warriorforum.com/programming/1077048-warning-code-help-appreciated.html)

BC27 22nd May 2015 08:59 PM

Warning in code - Help appreciated
 
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.

Xorb 23rd May 2015 01:03 AM

Re: Warning in code - Help appreciated
 
$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.

BC27 23rd May 2015 11:22 AM

Re: Warning in code - Help appreciated
 
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.


All times are GMT -6. The time now is 02:32 AM.