Skip to content

[SITE-5390] Adds compatibility fixes for PHP 8.4.8#336

Draft
AnaisPantheor wants to merge 2 commits intomainfrom
fixcompatibility
Draft

[SITE-5390] Adds compatibility fixes for PHP 8.4.8#336
AnaisPantheor wants to merge 2 commits intomainfrom
fixcompatibility

Conversation

@AnaisPantheor
Copy link
Copy Markdown
Contributor

@AnaisPantheor AnaisPantheor commented Nov 28, 2025

AI-generated drafts from Claude Code - will stay in draft until I actually look at them

PHP 8.4 Compatibility fixes suggested by Claude Code

pantheon-sessions.php
- Fixed 3 critical logic bugs (lines 552, 656, 709)
- Changed 3 loose comparisons to strict comparisons (lines 335, 542, 629)

inc/class-admin.php
- Updated to use transients instead of URL parameters for messages

@AnaisPantheor AnaisPantheor marked this pull request as ready for review December 1, 2025 15:29
@AnaisPantheor AnaisPantheor requested a review from a team as a code owner December 1, 2025 15:29
@AnaisPantheor AnaisPantheor marked this pull request as draft January 2, 2026 16:37
Comment on lines -80 to +82
if ( isset( $_GET['message'] ) && in_array( $_GET['message'], [ 'delete-all-session', 'delete-session' ], true ) ) {
if ( 'delete-all-session' === $_GET['message'] ) {
// Check for success message transient.
$transient_key = 'pantheon_sessions_message_' . get_current_user_id();
$session_message = get_transient( $transient_key );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still don't understand this pattern and I don't think it's a good practice. We can just add nonce checks to the $_GET checks.

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.

2 participants