HTML-API: Prevent unintended behavior when WP_HTML_Token is unserialized.

Merges [57163] to the to the 6.4 branch.

Props dmsnell, peterwilsoncc, dd32, xknown, rawrly, johnbillion, barry, jeffpaul, vortfu, isabel_brison, mikeschroder, jorbin.

Built from https://develop.svn.wordpress.org/branches/6.4@57164


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill 2023-12-06 16:07:19 +00:00
parent 57eb43d38d
commit 96efc7d67a
2 changed files with 10 additions and 1 deletions

View File

@ -94,4 +94,13 @@ class WP_HTML_Token {
call_user_func( $this->on_destroy, $this->bookmark_name );
}
}
/**
* Wakeup magic method.
*
* @since 6.4.2
*/
public function __wakeup() {
throw new \LogicException( __CLASS__ . ' should never be unserialized' );
}
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4.2-alpha-57160';
$wp_version = '6.4.2-alpha-57164';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.