Skip to content

Commit

Permalink
Removing FS_User::$is_beta dynamic created property with obsolete dat…
Browse files Browse the repository at this point in the history
…a from database
  • Loading branch information
DanieleFreemius committed Dec 2, 2024
1 parent 6a20336 commit 93d2d11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion includes/entities/class-fs-site.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FS_Site extends FS_Scope_Entity {
*/
public $site_id;
/**
* @var number
* @var int
*/
public $blog_id;
/**
Expand Down
10 changes: 5 additions & 5 deletions includes/entities/class-fs-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ function __construct( $user = false ) {
}

/**
* @return void
*
* This function removes the deprecated 'is_beta' property from the serialized data.
* This method removes the deprecated 'is_beta' property from the serialized data.
* Should clean up the serialized data to avoid PHP 8.2 warning on next execution.
*
* @return void
*/
public function __wakeup() {
if ( isset($this->is_beta) ) {
function __wakeup() {
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 );
}
Expand Down

0 comments on commit 93d2d11

Please sign in to comment.