Skip to content

Commit 9c1e53e

Browse files
committed
fix: correctly handle empty files var
1 parent e6f6988 commit 9c1e53e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

classes/local/files/response_file_service.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ public static function unmangle_filename(string $filename): array {
253253
*/
254254
public function get_all_files_from_qt_data(array $response): array {
255255
$accessor = $response[constants::QT_VAR_RESPONSE_FILES] ?? null;
256-
if ($accessor === null) {
256+
if ($accessor === null || $accessor === '') {
257+
// When empty (i.e. no files), no question_file_loader is created when loading.
257258
return [];
258259
}
259260

0 commit comments

Comments
 (0)