From c3568262cd98afc39d864ab72c0bcc421fd19050 Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Wed, 13 Nov 2024 21:27:18 +0100 Subject: [PATCH] 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. --- webapp/src/Controller/API/JudgehostController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/src/Controller/API/JudgehostController.php b/webapp/src/Controller/API/JudgehostController.php index 8cfa36c80a..8eb6239515 100644 --- a/webapp/src/Controller/API/JudgehostController.php +++ b/webapp/src/Controller/API/JudgehostController.php @@ -394,9 +394,12 @@ public function updateJudgingAction( if ($judging->getOutputCompile() === null) { $judging ->setOutputCompile($output_compile) - ->setCompileMetadata(base64_decode($compileMetadata)) ->setResult(Judging::RESULT_COMPILER_ERROR) ->setEndtime(Utils::now()); + + if ($compileMetadata !== null) { + $judging->setCompileMetadata(base64_decode($compileMetadata)); + } $this->em->flush(); if ($judging->getValid()) {