Merge branch 'MDL-86802-500' of https://github.com/Jayce0808/moodle into MOODLE_500_STABLE

This commit is contained in:
Huong Nguyen
2026-01-16 15:26:53 +08:00
committed by Jake Dallimore
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -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 {