Skip to content

Commit ad989ae

Browse files
Convert whitesmoke to hex before parsing it
This fixes many deprecation errors on the mobile scoreboard.
1 parent 1c80b26 commit ad989ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webapp/src/Twig/TwigExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ public function problemBadge(ContestProblem $problem, bool $grayedOut = false):
11361136
{
11371137
$rgb = Utils::convertToHex($problem->getColor() ?? '#ffffff');
11381138
if ($grayedOut) {
1139-
$rgb = 'whitesmoke';
1139+
$rgb = Utils::convertToHex('whitesmoke');
11401140
}
11411141
$background = Utils::parseHexColor($rgb);
11421142

@@ -1166,7 +1166,7 @@ public function problemBadgeMaybe(ContestProblem $problem, ScoreboardMatrixItem
11661166
{
11671167
$rgb = Utils::convertToHex($problem->getColor() ?? '#ffffff');
11681168
if (!$matrixItem->isCorrect) {
1169-
$rgb = 'whitesmoke';
1169+
$rgb = Utils::convertToHex('whitesmoke');
11701170
}
11711171
$background = Utils::parseHexColor($rgb);
11721172

0 commit comments

Comments
 (0)