MDL-46212 questions: add {} whenver vars are put into "" strings
Having had one subtle bug cased be this, I decided to do a search and fix all of these.
This commit is contained in:
@@ -259,7 +259,7 @@ function question_preview_question_pluginfile($course, $context, $component,
|
||||
|
||||
$fs = get_file_storage();
|
||||
$relativepath = implode('/', $args);
|
||||
$fullpath = "/$context->id/$component/$filearea/$relativepath";
|
||||
$fullpath = "/{$context->id}/{$component}/{$filearea}/{$relativepath}";
|
||||
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) or $file->is_directory()) {
|
||||
send_file_not_found();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user