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.


git-svn-id: https://develop.svn.wordpress.org/branches/6.4@57164 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe McGill 2023-12-06 16:04:44 +00:00
parent c1f36fafdb
commit b90dc99d51

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' );
}
}