Fix scrutinizer complains and return type doc
This commit is contained in:
parent
02c60949dd
commit
2eecfcbb80
1 changed files with 6 additions and 4 deletions
|
@ -2395,15 +2395,17 @@ class Share extends Constants {
|
||||||
*
|
*
|
||||||
* @param string $url
|
* @param string $url
|
||||||
* @param array $fields post parameters
|
* @param array $fields post parameters
|
||||||
* @return bool
|
* @return array
|
||||||
*/
|
*/
|
||||||
private static function tryHttpPost($url, $fields) {
|
private static function tryHttpPost($url, $fields) {
|
||||||
$protocol = 'https://';
|
$protocol = 'https://';
|
||||||
$success = false;
|
$result = [
|
||||||
|
'success' => false,
|
||||||
|
'result' => '',
|
||||||
|
];
|
||||||
$try = 0;
|
$try = 0;
|
||||||
while ($success === false && $try < 2) {
|
while ($result['success'] === false && $try < 2) {
|
||||||
$result = \OC::$server->getHTTPHelper()->post($protocol . $url, $fields);
|
$result = \OC::$server->getHTTPHelper()->post($protocol . $url, $fields);
|
||||||
$success = $result['success'];
|
|
||||||
$try++;
|
$try++;
|
||||||
$protocol = 'http://';
|
$protocol = 'http://';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue