title: Error: "Only variables can be passed by reference" in PHP script
body: <p>I am having the error "<strong>Fatal error: Only variables can be passed by reference</strong>" in the following lines of code.</p>
  
  <pre><code>$ag = array(M($forge[2][$i], NULL, TRUE), M($about[0]["text"], "Less", TRUE), M($address[0]["text"], NULL, TRUE), M($phone[0]["text"], NULL, TRUE), M($website[0]["text"], "...", TRUE));
  
  if(CAT)
      array_push($ag, M($cat[1], NULL, TRUE));
  
  $pf_args =  str_replace("%s, ", "", PLACEHOLDER, 4 - count($_POST['ad']));
  
  file_put_contents("files/" . FILENAME . ".sql", vsprintf($pf_args, $ag), FILE_APPEND); 
  </code></pre>
  
  <p>The message shows error in the last line. Can any one suggest me the reason?</p>
  
  <p><strong>(Edit)</strong>: M() is defined as: </p>
  
  <pre><code>function M($text, $str = NULL, $escape = FALSE) {
      if (!empty($str))
          $text = str_replace($str, "", $text);
      $text = str_replace("(Edit)", "", $text);
      $text = str_replace("More", "", $text);
      $text = str_replace("Less", "", $text);
      $text = str_replace("&lt;br&gt;", "\n", $text);
      if ($escape)
          return mysql_escape_string(trimText(html_entity_decode(strip_tags($text))));
      else
          return trimText(html_entity_decode(strip_tags($text)));
  }
  </code></pre>