Closed julianfssen closed 2 years ago
This PR fixes the following error caught by one of our customers, reported here:
HP Fatal error: Uncaught Error: Non-static method Memberful_User_Mapping_Repository::delete_mapping() cannot be called statically
The following instance method, delete_mapping:
delete_mapping
// syncing.php class Memberful_User_Mapping_Repository { // ... public function delete_mapping( $user_id ) { global $wpdb; return $wpdb->delete(self::table(), array( "wp_user_id" => $user_id ) ); }
is called statically in syncing.php#63:
syncing.php#63
// ... if ( memberful_is_safe_to_delete( $user ) ) { wp_delete_user( $user->ID ); Memberful_User_Mapping_Repository::delete_mapping( $user->ID );
which is deprecated in PHP 8.0 and throws an error on calling: PHP 8.0: Calling non-static class methods statically result in a fatal error
This PR fixes the following error caught by one of our customers, reported here:
HP Fatal error: Uncaught Error: Non-static method Memberful_User_Mapping_Repository::delete_mapping() cannot be called statically
The following instance method,
delete_mapping
:is called statically in
syncing.php#63
:which is deprecated in PHP 8.0 and throws an error on calling: PHP 8.0: Calling non-static class methods statically result in a fatal error