[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
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ function getContents($url, $header = array(), $opts = array()){
curl_setopt($ch, CURLOPT_ENCODING, '');
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));