Skip to content

Commit

Permalink
Fix incorrect syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuvu authored and timhunt committed Sep 15, 2022
1 parent 9fb3f51 commit 7af298d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ function mod_studentquiz_question_pluginfile($course, $context, $component,
$fs = get_file_storage();
$relativepath = implode('/', $args);
$fullpath = "/$context->id/$component/$filearea/$relativepath";
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) || $file->is_directory()) {
$file = $fs->get_file_by_hash(sha1($fullpath));
if (!$file || $file->is_directory()) {
send_file_not_found();
}

Expand Down

0 comments on commit 7af298d

Please sign in to comment.