php warning – wp_list_pluck, wp-list-util
-
After upgrade to wp 6.1, wp thrown a php warning “Trying to access array offset on value of type int in /var/web/site/public_html/wp-includes/class-wp-list-util.php on line 170”
debug log pointed out the below code. Please anyone help me to identify my mistake.
$tags_list = ''; $position_list = ''; $tags = get_the_tags(); if( !is_wp_error( $tags ) && !empty( $tags ) && isset($tags) ) { $tags_list = wp_list_pluck( $tags, 'slug' ); } $positions = get_the_terms($post, 'position'); if( !is_wp_error( $positions ) && !empty( $positions ) && isset($positions) ) { $position_list = wp_list_pluck( $positions, 'slug' ); }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘php warning – wp_list_pluck, wp-list-util’ is closed to new replies.