title: PHP curl_setopt() error invalid characters
body: <p>I have some code of a website in which cURL is used (not quite "mine"..part of an open source project) and after loading up the site on localhost of my VM for the first time in months because I want to help with a recent issue that has arisen, which is unrelated to cURL, I had fixed one local problem which was obvious to me and now when trying to log in to the site I get this error</p>
  
  <pre><code>curl_setopt(): Curl option contains invalid characters (\0)
  </code></pre>
  
  <p>Whatever I have messed up though, this seems to happen trying to load any page not just login page.
  This is the line of code it points to</p>
  
  <pre><code>curl_setopt($re, CURLOPT_COOKIE, "slim_session=".$_COOKIE['slim_session'].";");
  </code></pre>
  
  <p>If it helps, through <code>error_log()</code>'ing I found that the value of <code>$_COOKIE['slim_session']</code> is <code>a:4:{s:10:"slim.flash";a:0:{}s:11:"AccessToken";O:48:"SolasMatch\\Common\\Protobufs\\Models\\OAuthResponse":4:{s:8:"
  </code></p>
  
  <p>Unfortunately cURL is not my strong suit, but I can provide more info on the situation as needed. You can see the full function the above code is from <a href="https://github.com/TheRosettaFoundation/SOLAS-Match/blob/develop/Common/lib/APIHelper.class.php#L84" rel="nofollow">here</a>.</p>