From 953c6e1022eb1f772c92073b31ebe1f9d7b5bf8b Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 24 Oct 2018 16:28:26 +0200 Subject: [PATCH] [contents] Skip setting options on empty array --- lib/contents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/contents.php b/lib/contents.php index 1d504f55..7e574ca5 100644 --- a/lib/contents.php +++ b/lib/contents.php @@ -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));