diff --git a/FlyCube/MpApi/Controller/PlaneController.class.php b/FlyCube/MpApi/Controller/PlaneController.class.php index a22da22..f207a73 100644 --- a/FlyCube/MpApi/Controller/PlaneController.class.php +++ b/FlyCube/MpApi/Controller/PlaneController.class.php @@ -182,10 +182,8 @@ class PlaneController extends PublicController } else { $msg = "已注销执行航线"; } - if (!$_REQUEST['runing']) { - $_REQUEST['runing'] = null; - } - $data['runing'] = $_REQUEST['runing']; + // 如果 $_REQUEST['runing'] 为空字符串,将其设置为 '' 而不是 NULL + $data['runing'] = $_REQUEST['runing'] !== null ? $_REQUEST['runing'] : ''; if ($rsDb->where($where)->save($data)) { echo json_encode(array('status' => 1, 'msg' => '站点航线执行操作成功'));