Skip to content

Commit b4a17d4

Browse files
committed
Only show compile if the judging is done
Based on https://domjudge.sentry.io/issues/7076103482/?project=4510437648695296&query=is%3Aunresolved&referrer=issue-stream ``` Level: Error Call to a member function getResult() on null ```
1 parent 71f90f2 commit b4a17d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webapp/src/Controller/Team/SubmissionController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function viewAction(Request $request, int $submitId): Response
150150
}
151151

152152
$runs = [];
153-
if ($showSampleOutput && $judging && $judging->getResult() !== 'compiler-error') {
153+
if ($showSampleOutput && $judging?->getResult() !== 'compiler-error') {
154154
$outputDisplayLimit = (int)$this->config->get('output_display_limit');
155155
$outputTruncateMessage = sprintf("\n[output display truncated after %d B]\n", $outputDisplayLimit);
156156

@@ -192,7 +192,7 @@ public function viewAction(Request $request, int $submitId): Response
192192
}
193193

194194
$actuallyShowCompile = $showCompile == self::ALWAYS_SHOW_COMPILE_OUTPUT
195-
|| ($showCompile == self::ONLY_SHOW_COMPILE_OUTPUT_ON_ERROR && $judging->getResult() === 'compiler-error');
195+
|| ($showCompile == self::ONLY_SHOW_COMPILE_OUTPUT_ON_ERROR && $judging?->getResult() === 'compiler-error');
196196

197197
$data = [
198198
'judging' => $judging,

0 commit comments

Comments
 (0)