curl_setopt_array( $ch, $curl_opt );
This code gives a Notice Notice: Array to string conversion in ...
This is what $curl_opt contains:
array (size=5)
  42 => boolean true
  19913 => boolean true
  10018 => string 'PHP RestClient/0.1.2' (length=20)
  10005 => 
    array (size=1)
      0 => string 'user:password' (length=13)
  10002 => string 'http://longurl.com/' (length=389)
is_array($curl_opt) returns true, so I don't really know what's causing the notice.
I think I'm just missing something really simple here but I just cannot, for the life of me, figure this one out.
It's just a notice and doesn't break anything but it just annoys me that I don't know what's causing it.
curl_setopt — Set an option for a cURL transfer.
$curl_opt should be a one-dimensional array................................
The key 10005 is not that case, it should be
$curl_opt = array(
  //...
  CURLOPT_USERPWD => '[username]:[password]'
  //...
);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With