Skip to content

修复 PHP 8 兼容性警告及 Header 跳转问题#1127

Merged
zhblue merged 1 commit intozhblue:masterfrom
jepeng-miao:jepeng-miao-patch-1
Jan 24, 2026
Merged

修复 PHP 8 兼容性警告及 Header 跳转问题#1127
zhblue merged 1 commit intozhblue:masterfrom
jepeng-miao:jepeng-miao-patch-1

Conversation

@zhblue
Copy link
Copy Markdown
Owner

@zhblue zhblue commented Jan 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 24, 2026 08:48
@zhblue zhblue merged commit f422d42 into zhblue:master Jan 24, 2026
6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses PHP 8 compatibility warnings by adding an isset() check before accessing $_POST['hlist']. The PR title mentions fixing both "PHP 8 compatibility warnings" and "Header redirect issues," though only the PHP 8 compatibility fix is visible in the provided diff.

Changes:

  • Added isset() check before accessing $_POST['hlist'] to prevent undefined array key warnings in PHP 8

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

$plist = trim($_POST['hlist']);
if(isset($_POST['hlist']))$plist = trim($_POST['hlist']);
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space between the condition and the statement. The syntax should be if(isset($_POST['hlist'])) $plist = trim($_POST['hlist']); with a space after the closing parenthesis. This deviates from the established convention in the codebase, as seen in trunk/web/admin/contest_list.php:31 and trunk/web/admin/news_list.php:31 where similar one-line if statements use a space.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants