Skip to content

Commit 653f6c5

Browse files
committed
Fix regex
1 parent 95aa592 commit 653f6c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ protected function loadContest(): void
530530
try {
531531
// The base URL is the URL of the CCS API root.
532532
// Proper is '^(.*\/)contests\/.*/', but PC^2 doesn't expose this (yet).
533-
if (preg_match('/^(.*\/)contest(s\/.*)/',
533+
if (preg_match('/^(.*\/)contest(s\/.*)?/',
534534
$this->source->getSource(), $matches) === 0) {
535535
$this->loadingError = 'Cannot determine base URL. Did you pass a CCS API contest URL?';
536536
$this->cachedContestData = null;

0 commit comments

Comments
 (0)