fix compatibility with php8

This commit is contained in:
xiaomlove
2020-12-29 03:02:34 +08:00
parent 32d47b66c9
commit fe7489ef51
33 changed files with 249 additions and 212 deletions

View File

@@ -26,12 +26,12 @@ if ($action == "confirmuser")
if ($action == "edituser")
{
$userid = $_POST["userid"];
$class = 0 + $_POST["class"];
$class = $_POST["class"] ?? 0;
$vip_added = ($_POST["vip_added"] == 'yes' ? 'yes' : 'no');
$vip_until = ($_POST["vip_until"] ? $_POST["vip_until"] : '0000-00-00 00:00:00');
$warned = $_POST["warned"];
$warnlength = 0 + $_POST["warnlength"];
$warnlength = $_POST["warnlength"] ?? 0;
$warnpm = $_POST["warnpm"];
$title = $_POST["title"];
$avatar = $_POST["avatar"];