Skip to content

Commit

Permalink
MDL-80157 file: Exception message spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
leonstr committed Nov 17, 2023
1 parent 3790c0a commit eba5cdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/filestorage/file_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ public function create_file_from_url($filerecord, $url, array $options = null, $
$tmpfile = tempnam($this->tempdir, 'newfromurl');
$content = download_file_content($url, $headers, $postdata, $fullresponse, $timeout, $connecttimeout, $skipcertverify, $tmpfile, $calctimeout);
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 {
$newfile = $this->create_file_from_pathname($filerecord, $tmpfile);
Expand All @@ -1261,7 +1261,7 @@ public function create_file_from_url($filerecord, $url, array $options = null, $
} else {
$content = download_file_content($url, $headers, $postdata, $fullresponse, $timeout, $connecttimeout, $skipcertverify, NULL, $calctimeout);
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);
}
Expand Down

0 comments on commit eba5cdf

Please sign in to comment.