• When submitting a form with checkboxes, the following error prevents successful form submission:

    <br />
        <b>Warning</b>:  trim() expects parameter 1 to be string, array given in <b>/home/jagfs/public_html/id-content/plugins/contact-form-7/includes/classes.php</b> on line <b>599</b><br />
        <br />
    <b>Warning</b>:  trim() expects parameter 1 to be string, array given in <b>/home/jagfs/public_html/id-content/plugins/contact-form-7/includes/classes.php</b> on line <b>599</b><br />
    {"mailSent":true,"into":"#wpcf7-f2062-p2063-o1","captcha":null,"message":"Your message was sent successfully. Thanks."}

    The solution is to do what was pointed out in another thread: open up /includes/classes.php and from line 599 change

    $submitted = trim( $submitted );
    
    			if ( is_array( $submitted ) )
    				$replaced = join( ', ', $submitted );
    			else
    				$replaced = $submitted;

    to this instead

    //$submitted = trim( $submitted ); Lose this line
    			if ( is_array( $submitted ) )
    				$replaced = join( ', ', $submitted );
    			else
    				$replaced = trim( $submitted );

    Thanks for an otherwise great plugin!

    BTW could you make it so when we choose multiple recipients for the emails it can either be ‘comma separated’ as it is now or the standard ‘semi-colon separated’ that we’re accustomed to from other software?

    http://wordpress.org/plugins/contact-form-7/

  • The topic ‘Please update the plugin to remove the PHP error!’ is closed to new replies.