diff --git a/web/app/upgrade/31_problem_resources/upgrade.php b/web/app/upgrade/31_problem_resources/upgrade.php index f4f8c1f..8e4443f 100644 --- a/web/app/upgrade/31_problem_resources/upgrade.php +++ b/web/app/upgrade/31_problem_resources/upgrade.php @@ -6,8 +6,8 @@ return function ($type) { $problems = DB::selectAll("select id from problems"); - foreach ($problems as $id) { - mkdir(UOJContext::storagePath() . "/problem_resources/$id"); + foreach ($problems as $row) { + mkdir(UOJContext::storagePath() . "/problem_resources/{$row['id']}"); } } };