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

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

Built from https://develop.svn.wordpress.org/trunk@57163


git-svn-id: http://core.svn.wordpress.org/trunk@56674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill 2023-12-06 16:05:19 +00:00
parent ebb9657bf7
commit 46406afcc4
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.5-alpha-57162';
$wp_version = '6.5-alpha-57163';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.