diff --git a/lib/private/share/share.php b/lib/private/share/share.php index d2bdca22f3..1ece47df7e 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -2395,15 +2395,17 @@ class Share extends Constants { * * @param string $url * @param array $fields post parameters - * @return bool + * @return array */ private static function tryHttpPost($url, $fields) { $protocol = 'https://'; - $success = false; + $result = [ + 'success' => false, + 'result' => '', + ]; $try = 0; - while ($success === false && $try < 2) { + while ($result['success'] === false && $try < 2) { $result = \OC::$server->getHTTPHelper()->post($protocol . $url, $fields); - $success = $result['success']; $try++; $protocol = 'http://'; }