mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-71920 core: update filelib opt name definition
This commit is contained in:
parent
f865b326ca
commit
fbe1ac8e13
1 changed files with 5 additions and 1 deletions
|
@ -3332,7 +3332,11 @@ class curl {
|
|||
throw new coding_exception('Curl options should be defined using strings, not constant values.');
|
||||
}
|
||||
if (stripos($name, 'CURLOPT_') === false) {
|
||||
$name = strtoupper('CURLOPT_'.$name);
|
||||
// Only prefix with CURLOPT_ if the option doesn't contain CURLINFO_,
|
||||
// which is a valid prefix for at least one option CURLINFO_HEADER_OUT.
|
||||
if (stripos($name, 'CURLINFO_') === false) {
|
||||
$name = strtoupper('CURLOPT_'.$name);
|
||||
}
|
||||
} else {
|
||||
$name = strtoupper($name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue