get rid of PHP warnings
-
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 ) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘get rid of PHP warnings’ is closed to new replies.