title: Warning: strtolower() expects parameter 1 to be string in wordpress
body: <p>I have developed a form using ajax in wordpress .Its working fine in localhost but when i uploaded the code on live server it gives me error on submitting the form.The error is:
  Warning: strtolower() expects parameter 1 to be string, array given in /home/content/26/11637326/html/surakshadal/wp-includes/formatting.php on line 1426</p>
  
  <p>Have a look on my code :
  HTML:</p>
  
  <pre><code> &lt;form class="form-horizontal" id="revForm" action=" " method="post"&gt;
              &lt;div class="formDetailsSections"&gt;
                  &lt;div class="form-group formSubheading  " id="formExDiv"&gt;
                      &lt;p&gt;Express Yourself&lt;/p&gt;
                  &lt;/div&gt;&lt;!--     account details--&gt;
                  &lt;div class="form-group "&gt;
                      &lt;label for="revArea" class="formText col-sm-4 control-label " style="text-align: center"&gt;Area&lt;/label&gt;
                      &lt;div class="col-sm-7"&gt;
                          &lt;input type="text" class="form-control" id="revArea" placeholder="Enter related Area"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group "&gt;
                      &lt;label for="revTitle" class="formText col-sm-4 control-label " style="text-align: center"&gt;Title&lt;/label&gt;
                      &lt;div class="col-sm-7"&gt;
                          &lt;input type="text" class="form-control" id="revTitle" placeholder="Enter Title"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group "&gt;
                      &lt;label for="reviewS" class="formText col-sm-4 control-label " style="text-align: center"&gt;Suggest/Complaint&lt;/label&gt;
                      &lt;div class="col-sm-7"&gt;
                          &lt;textarea name="reviewS" class="form-control" id="reviewS" placeholder="Write For The Community"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div class="divError"&gt;
                      &lt;p class="error"&gt; &lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="formButton"&gt;
                  &lt;button type="submit" id="revFormBtn" class="btn btn-warning btn-lg"&gt;Post&lt;/button&gt;
              &lt;/div&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>below is my jquery and ajax code:</p>
  
  <pre><code> jQuery("#revForm").submit(function(e)
  {
      e.preventDefault();
      var area=jQuery("#revArea").val();
      var title=jQuery("#revTitle").val();
      var rev=jQuery("#reviewS").val();
      console.log(area);
      console.log(title);
      var ajaxdata={
          action:'review_action',
          area:area,
          title:title,
          rev:rev
      };
      jQuery.post(ajaxurl, ajaxdata,function(res)
      {
          if (res=='')
          {
  
              jQuery("#PostSubmittedDiv").show();
              jQuery("#formSuggestDiv").hide();
  
          }
          else {
              jQuery(".divError").html(res);
          }
  
      });
  
  });
  </code></pre>
  
  <p>and below is my php code in fucntions.php file:</p>
  
  <pre><code>function review()
  {
   if($_POST['action']=='review_action')
   {
   $area=$_POST['area'];
   $title=$_POST['title'];
   $rev=$_POST['rev'];
   $my_post = array(
       'post_title'    =&gt; $title,
       'post_content'  =&gt; $rev,
       'post_status'   =&gt; 'publish',
       'post_type'     =&gt;  'reviews',
       'comment_status' =&gt; [ 'open' ],
   );
  $post1= wp_insert_post( $my_post );
   if ( is_wp_error($post1) )
       echo $post1-&gt;get_error_message();
  
   }
  wp_die();
  }
  add_action('wp_ajax_review_action', 'review');
  add_action('wp_ajax_nopriv_review_action', 'review');
  </code></pre>