Skip to content

Commit 8dbd0a2

Browse files
vmcjnickygerritsen
authored andcommitted
Fix regex
1 parent 444e30a commit 8dbd0a2

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
@@ -523,7 +523,7 @@ protected function loadContest(): void
523523
try {
524524
// The base URL is the URL of the CCS API root.
525525
// Proper is '^(.*\/)contests\/.*/', but PC^2 doesn't expose this (yet).
526-
if (preg_match('/^(.*\/)contest(s\/.*)/',
526+
if (preg_match('/^(.*\/)contest(s\/.*)?/',
527527
$this->source->getSource(), $matches) === 0) {
528528
$this->loadingError = 'Cannot determine base URL. Did you pass a CCS API contest URL?';
529529
$this->cachedContestData = null;

0 commit comments

Comments
 (0)