title: Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')'
body: <p>I do not know, what is wrong with this code:</p>
  
  <pre><code>function my_wpcf7_save($cfdata) {
  
  $formtitle = $cfdata-&gt;title;
  $formdata = $cfdata-&gt;posted_data;   
  
  if ( $formtitle == 'contactform1') {
  
      // access data from the submitted form
      $formfield = $formdata['name'];
  
      // create a new post
      $newpost = array( 
                    'post_title' -&gt; $formdata['name']);
                    'post_content' -&gt; $formdata['message']);
                    'post_status' -&gt; 'publish');
  
      $newpostid = wp_insert_post($newpost);
  
      // add meta data for the new post
      add_post_meta($newpostid, 'email', $formdata['email']);
      add_post_meta($newpostid, 'subject', $formdata['subject']);
  }
  
  }
  add_action('wpcf7_before_send_mail', 'my_wpcf7_save',1);
  </code></pre>
  
  <p>I got the error:
  <strong>Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')'</strong> 
  ... for this line: 'post_title' -> $formdata['name']);</p>
  
  <p>As far as I know, the syntax is right, isn't it? </p>