Merge branch 'MDL-86802-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE
This commit is contained in:
+3
-2
@@ -4176,9 +4176,10 @@ class curl {
|
||||
* @param string $url
|
||||
* @param array $params
|
||||
* @param array $options
|
||||
* @param bool $includeuserpwd Whether to include CURLOPT_USERPWD if not already set
|
||||
* @return ?string
|
||||
*/
|
||||
public function put($url, $params = array(), $options = array()) {
|
||||
public function put($url, $params = [], $options = [], $includeuserpwd = true) {
|
||||
$file = '';
|
||||
$fp = false;
|
||||
if (isset($params['file'])) {
|
||||
@@ -4192,7 +4193,7 @@ class curl {
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
if (!isset($this->options['CURLOPT_USERPWD'])) {
|
||||
if (!isset($this->options['CURLOPT_USERPWD']) && $includeuserpwd) {
|
||||
$this->setopt(array('CURLOPT_USERPWD' => 'anonymous: [email protected]'));
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user