From ca6ad020fd4162d108735dedc120eae57762ba37 Mon Sep 17 00:00:00 2001 From: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> Date: Sat, 24 Feb 2024 09:57:24 +0100 Subject: [PATCH] Update webapp/src/Service/ExternalContestSourceService.php --- webapp/src/Service/ExternalContestSourceService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/Service/ExternalContestSourceService.php b/webapp/src/Service/ExternalContestSourceService.php index c07b747334..6e49f51c2a 100644 --- a/webapp/src/Service/ExternalContestSourceService.php +++ b/webapp/src/Service/ExternalContestSourceService.php @@ -536,7 +536,7 @@ protected function loadContest(): void try { // The base URL is the URL of the CCS API root. // Proper is '^(.*\/)contests\/.*/', but PC^2 doesn't expose this (yet). - if (preg_match('/^(.*\/)contest(s\/.*/)?', + if (preg_match('/^(.*\/)contest(s\/.*)/', $this->source->getSource(), $matches) === 0) { $this->loadingError = 'Cannot determine base URL. Did you pass a CCS API contest URL?'; $this->cachedContestData = null;