afragen / wordpress-beta-tester

WordPress Beta Tester plugin

Home Page:https://wordpress.org/plugins/wordpress-beta-tester/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.1: Deprecated: explode()

Soean opened this issue · comments

get_current_wp_release() returns null, if the API responds with an error:

if ( is_wp_error( $response ) ) {
return null;
}

This value is used as 2. parameter in explode():

$current_release        = $this->wp_beta_tester->get_current_wp_release();
$next_release           = array_map( 'intval', explode( '.', $current_release ) );

With PHP 8.1 I get an error:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated

Thanks for the debugging. I'll get this updated and released.