Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.2 Warning #1371

Open
rizaardiyanto1412 opened this issue Apr 26, 2024 · 0 comments
Open

PHP 8.2 Warning #1371

rizaardiyanto1412 opened this issue Apr 26, 2024 · 0 comments

Comments

@rizaardiyanto1412
Copy link

Our error logs are littered with warnings from /advanced-gutenberg/incl/advanced-gutenberg-main.php with php8.2 and WP 6.5.2

The following changes will fix them:

Requires php 7.0

Change line 1033 to:

$block['category'] = sanitize_text_field( $block['category'] ?? '' );
Change line 3413 to:

$current_user_role = $current_user->roles[0] ?? ''; // string
Change line 3437 to:

foreach ( ( $current_user_role ?? [] ) as $cur_ ) {
Change line 4768 to:

if ( $saved_settings['gallery_lightbox'] ?? false ) {

Original report: https://wordpress.org/support/topic/get-rid-of-php-warnings/

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

No branches or pull requests

1 participant