shi-yang / jnoj

Jiangnan Online Judge
https://www.jnoj.dev
Other
241 stars 62 forks source link

Polyon System Bug #86

Open fearlessxjdx opened 4 years ago

fearlessxjdx commented 4 years ago

打开 http://localhost/polygon/problem/tests?id=1 报错 服务器内部错误。#8
日志如下:

2020-09-15 11:47:45 [x.x.x.x][1][j1ujubjvua4fm0ivkqo9c][error][yii\base\ErrorException:8] yii\base\ErrorException: Trying to access array offset on value of type bool in /opt/jnoj/modules/polygon/views/problem/tests.php:45
Stack trace:
#0 /opt/jnoj/modules/polygon/views/problem/tests.php(45): yii\base\ErrorHandler->handleError()
#1 /opt/jnoj/vendor/yiisoft/yii2/base/View.php(348): require('/opt/jnoj/modul...')
#2 /opt/jnoj/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile()
#3 /opt/jnoj/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile()
#4 /opt/jnoj/vendor/yiisoft/yii2/base/Controller.php(386): yii\base\View->render()
#5 /opt/jnoj/modules/polygon/controllers/ProblemController.php(231): yii\base\Controller->render()
#6 [internal function]: app\modules\polygon\controllers\ProblemController->actionTests()
#7 /opt/jnoj/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#8 /opt/jnoj/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams()
#9 /opt/jnoj/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction()
#10 /opt/jnoj/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()
#11 /opt/jnoj/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest()
#12 /opt/jnoj/web/index.php(12): yii\base\Application->run()
#13 {main}
2020-09-15 11:47:45 [x.x.x.x][1][j1ujubjvua4fm0ivkqo9c][info][application] $_GET = [
    'id' => '1'
]
 45: <th><?= Html::a($solutionStatus['id'], ['/polygon/problem/solution-detail', 'id' => $model->id, 'sid' => $solutionStatus['id']]) ?></th>

似乎 $solutionStatus 变量不符合预期