From 9670d3e98b2fdfb8a3865dcaf954b1fef5f1e574 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Fri, 13 Jun 2014 15:28:35 +0200
Subject: [PATCH] Always send a POST body

---
 apps/files_sharing/lib/external/scanner.php | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/external/scanner.php
index 8fb8683ed9..7381450521 100644
--- a/apps/files_sharing/lib/external/scanner.php
+++ b/apps/files_sharing/lib/external/scanner.php
@@ -28,10 +28,8 @@ class Scanner extends \OC\Files\Cache\Scanner {
 
 		curl_setopt($ch, CURLOPT_URL, $url);
 		curl_setopt($ch, CURLOPT_POST, 1);
-		if ($password) {
-			curl_setopt($ch, CURLOPT_POSTFIELDS,
-				http_build_query(array('password' => $password)));
-		}
+		curl_setopt($ch, CURLOPT_POSTFIELDS,
+			http_build_query(array('password' => $password)));
 		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
 		$result = curl_exec($ch);
-- 
GitLab