Skip to content

Commit

Permalink
HTML-API: Prevent unintended behavior when WP_HTML_Token is unseriali…
Browse files Browse the repository at this point in the history
…zed.

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


git-svn-id: https://develop.svn.wordpress.org/trunk@57163 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
joemcgill committed Dec 6, 2023
1 parent 0300f88 commit 52854e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/wp-includes/html-api/class-wp-html-token.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ public function __destruct() {
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' );
}
}

0 comments on commit 52854e2

Please sign in to comment.