Bug: T229366
Change-Id: I8f0a537f0b6b76aac0c52e691ec4653c51c49940
}
public function __sleep() {
- return array_diff(
- array_keys( get_object_vars( $this ) ),
- [ 'mParseStartTime' ]
+ return array_filter( array_keys( get_object_vars( $this ) ),
+ function ( $field ) {
+ if ( $field === 'mParseStartTime' ) {
+ return false;
+ } elseif ( strpos( $field, "\0" ) !== false ) {
+ // Unserializing unknown private fields in HHVM causes
+ // member variables with nulls in their names (T229366)
+ return false;
+ } else {
+ return true;
+ }
+ }
);
}