Skip to content

Commit a806495

Browse files
committed
Fix compiler error reporting for empty source file sets.
Empty source file sets can happen with filtered file extensions, when you accept a submission and later trim down the list of filtered file extensions to a smaller set. We also saw this during shadowing, but probably want to classify that as an import error.
1 parent 635d497 commit a806495

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

webapp/src/Controller/API/JudgehostController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,12 @@ public function updateJudgingAction(
394394
if ($judging->getOutputCompile() === null) {
395395
$judging
396396
->setOutputCompile($output_compile)
397-
->setCompileMetadata(base64_decode($compileMetadata))
398397
->setResult(Judging::RESULT_COMPILER_ERROR)
399398
->setEndtime(Utils::now());
399+
400+
if ($compileMetadata !== null) {
401+
$judging->setCompileMetadata(base64_decode($compileMetadata));
402+
}
400403
$this->em->flush();
401404

402405
if ($judging->getValid()) {

0 commit comments

Comments
 (0)