summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-06-02 11:20:24 +0200
committerLukas Reschke <lukas@owncloud.com>2015-06-02 11:20:24 +0200
commit8c6e5907d1453de23cfdb2841154fe9a732b1d89 (patch)
treeb115018bc543e453e9037d3d26f68f0d2f0e55ee
parent72e576e5290d77c0850c5a54bc1f23bbc150c63c (diff)
downloadnextcloud-server-8c6e5907d1453de23cfdb2841154fe9a732b1d89.tar.gz
nextcloud-server-8c6e5907d1453de23cfdb2841154fe9a732b1d89.zip
Check if array
The great library that we use apparently uses mixed types for everything because :see_no_evil: Fixes https://github.com/owncloud/core/issues/16679
-rw-r--r--apps/files_external/3rdparty/Dropbox/OAuth/Curl.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files_external/3rdparty/Dropbox/OAuth/Curl.php b/apps/files_external/3rdparty/Dropbox/OAuth/Curl.php
index cfa33ed0e1a..2f7da1ad253 100644
--- a/apps/files_external/3rdparty/Dropbox/OAuth/Curl.php
+++ b/apps/files_external/3rdparty/Dropbox/OAuth/Curl.php
@@ -75,11 +75,13 @@ class Dropbox_OAuth_Curl extends Dropbox_OAuth {
//if (is_array($arguments))
// $arguments=http_build_query($arguments);
- foreach ($arguments as $key => $value) {
- if($value[0] === '@') {
- exit();
- }
- }
+ if(is_array($arguments)) {
+ foreach ($arguments as $key => $value) {
+ if ($value[0] === '@') {
+ exit();
+ }
+ }
+ }
curl_setopt($ch, CURLOPT_POSTFIELDS, $arguments);
// $httpHeaders['Content-Length']=strlen($arguments);
} else {