Skip to content

Commit

Permalink
Avoid waking up WP_HTML_Token via deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell authored and cbravobernal committed Dec 7, 2023
1 parent fa76e8a commit f81c185
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/compat/wordpress-6.4/html-api/class-wp-html-token.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,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 f81c185

Please sign in to comment.