HTML API: Prevent Open Elements class from waking up.
This class accepts a Closure, but it should not be possible to wake up with one from a serialized class instance. Developed in https://github.com/WordPress/wordpress-develop/pull/6852 Discussed in https://core.trac.wordpress.org/ticket/61348 Props jonsurrell. See #61348. Follow-up to [58304]. Built from https://develop.svn.wordpress.org/trunk@58441 git-svn-id: http://core.svn.wordpress.org/trunk@57890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -517,4 +517,13 @@ class WP_HTML_Open_Elements {
|
||||
( $this->pop_handler )( $item );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wakeup magic method.
|
||||
*
|
||||
* @since 6.6.0
|
||||
*/
|
||||
public function __wakeup() {
|
||||
throw new \LogicException( __CLASS__ . ' should never be unserialized' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user