/** @var string[] */
private static $speculativeFields = [
'speculativePageIdUsed',
- 'speculativeRevIdUsed',
+ 'mSpeculativeRevId',
'revisionTimestampUsed'
];
/** @var int|null Assumed rev ID for {{REVISIONID}} if no revision is set */
- private $speculativeRevIdUsed;
+ private $mSpeculativeRevId;
/** @var int|null Assumed page ID for {{PAGEID}} if no revision is set */
private $speculativePageIdUsed;
/** @var int|null Assumed rev timestamp for {{REVISIONTIMESTAMP}} if no revision is set */
* @since 1.28
*/
public function setSpeculativeRevIdUsed( $id ) {
- $this->speculativeRevIdUsed = $id;
+ $this->mSpeculativeRevId = $id;
}
/**
* @since 1.28
*/
public function getSpeculativeRevIdUsed() {
- return $this->speculativeRevIdUsed;
+ return $this->mSpeculativeRevId;
}
/**
}
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;
+ }
+ }
);
}