mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-80157 file: Exception message spelling
This commit is contained in:
parent
b58d1fd4e2
commit
a1a8facb9b
@ -1247,7 +1247,7 @@ class file_storage {
|
|||||||
$tmpfile = tempnam($this->tempdir, 'newfromurl');
|
$tmpfile = tempnam($this->tempdir, 'newfromurl');
|
||||||
$content = download_file_content($url, $headers, $postdata, $fullresponse, $timeout, $connecttimeout, $skipcertverify, $tmpfile, $calctimeout);
|
$content = download_file_content($url, $headers, $postdata, $fullresponse, $timeout, $connecttimeout, $skipcertverify, $tmpfile, $calctimeout);
|
||||||
if ($content === false) {
|
if ($content === false) {
|
||||||
throw new file_exception('storedfileproblem', 'Can not fetch file form URL');
|
throw new file_exception('storedfileproblem', 'Cannot fetch file from URL');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$newfile = $this->create_file_from_pathname($filerecord, $tmpfile);
|
$newfile = $this->create_file_from_pathname($filerecord, $tmpfile);
|
||||||
@ -1261,7 +1261,7 @@ class file_storage {
|
|||||||
} else {
|
} else {
|
||||||
$content = download_file_content($url, $headers, $postdata, $fullresponse, $timeout, $connecttimeout, $skipcertverify, NULL, $calctimeout);
|
$content = download_file_content($url, $headers, $postdata, $fullresponse, $timeout, $connecttimeout, $skipcertverify, NULL, $calctimeout);
|
||||||
if ($content === false) {
|
if ($content === false) {
|
||||||
throw new file_exception('storedfileproblem', 'Can not fetch file form URL');
|
throw new file_exception('storedfileproblem', 'Cannot fetch file from URL');
|
||||||
}
|
}
|
||||||
return $this->create_file_from_string($filerecord, $content);
|
return $this->create_file_from_string($filerecord, $content);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user