diff --git a/server/app/api/controller/GameController.php b/server/app/api/controller/GameController.php index f3d6f37..edadbcf 100644 --- a/server/app/api/controller/GameController.php +++ b/server/app/api/controller/GameController.php @@ -71,7 +71,7 @@ class GameController extends OpenController { $userId = (int) ($request->player_id ?? 0); $rediction = $request->post('rediction'); - if ($rediction === '' || $rediction === null) { + if (empty($rediction)) { return $this->fail('请传递 rediction 参数', ReturnCode::PARAMS_ERROR); } $direction = (int) $rediction;