[contents] Skip setting options on empty array

This commit is contained in:
logmanoriginal 2018-10-24 16:28:26 +02:00
parent dbd44f64dd
commit 953c6e1022

View file

@ -17,7 +17,7 @@ function getContents($url, $header = array(), $opts = array()){
curl_setopt($ch, CURLOPT_ENCODING, ''); curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
if(is_array($opts)) { if(is_array($opts) && count($opts) !== 0) {
debugMessage('Setting options: ' . json_encode($opts)); debugMessage('Setting options: ' . json_encode($opts));