Skip to content

Commit 9ec1f2b

Browse files
committed
chore: avoid using nullsafe operator in php7
Nullsafe operator is supported since PHP8. Avoid using nullsafe operators in PHP7, as domjudge 8.2 branch needs to support PHP 7.4 Signed-off-by: cubercsl <[email protected]>
1 parent b36292c commit 9ec1f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Twig/TwigExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ public function problemBadge(ContestProblem $problem): string
11111111
public function problemBadgeForContest(Problem $problem, ?Contest $contest = null): string
11121112
{
11131113
$contest ??= $this->dj->getCurrentContest();
1114-
$contestProblem = $contest?->getContestProblem($problem);
1114+
$contestProblem = $contest !== null ? $contest->getContestProblem($problem) : null;
11151115
return $contestProblem === null ? '' : $this->problemBadge($contestProblem);
11161116
}
11171117

0 commit comments

Comments
 (0)