diff --git a/includes/entities/class-fs-user.php b/includes/entities/class-fs-user.php index 3aed0982..1da3aa59 100755 --- a/includes/entities/class-fs-user.php +++ b/includes/entities/class-fs-user.php @@ -54,13 +54,20 @@ function __construct( $user = false ) { * * @return void */ - function __wakeup() { + function __unserialize( $data ) { if ( property_exists( $this, 'is_beta' ) ) { // If we enter here, and we are running PHP 8.2, we already had the warning. But we sanitize data for next execution. unset( $this->is_beta ); } } + /** + * Compatibility wrapper of `__unserialize` for PHP < 7.4. + */ + function __wakeup() { + $this->__unserialize( array() ); + } + function get_name() { return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) ); } @@ -83,4 +90,4 @@ function is_beta() { static function get_type() { return 'user'; } - } \ No newline at end of file + }