From 45231090850ad3389616599af5cd4bfa8428b1a8 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Thu, 19 Jan 2023 11:47:35 +0800 Subject: [PATCH] fix(problem/remote): difficulty --- web/app/models/UOJRemoteProblem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/models/UOJRemoteProblem.php b/web/app/models/UOJRemoteProblem.php index 361cb66..e4c69f4 100644 --- a/web/app/models/UOJRemoteProblem.php +++ b/web/app/models/UOJRemoteProblem.php @@ -58,7 +58,7 @@ class UOJRemoteProblem { foreach ($dom->querySelectorAll('.tag-box') as &$elem) { $matches = []; - if (preg_match('/\*([0-9]{3,4})/', trim($elem->innerHTML), $matches) !== false) { + if (preg_match('/\*([0-9]{3,4})/', trim($elem->innerHTML), $matches)) { $difficulty = intval($matches[1]); break;