// allows rev_parent_id to be NULL.
$this->mParentId = isset( $row->rev_parent_id ) ? intval( $row->rev_parent_id ) : null;
$this->mSize = isset( $row->rev_len ) ? intval( $row->rev_len ) : null;
- $this->mSha1 = isset( $row->rev_sha1 ) ? $row->rev_sha1 : null;
+ $this->mSha1 = !empty( $row->rev_sha1 ) ? $row->rev_sha1 : null;
// NOTE: we must not call $this->mTitle->getLatestRevID() here, since the state of
// page_latest may be in limbo during revision creation. In that case, calling
}
/**
+ * @throws RevisionAccessException if the size was unknown and could not be calculated.
* @return string The nominal revision size, never null. May be computed on the fly.
*/
public function getSize() {
}
/**
+ * @throws RevisionAccessException if the hash was unknown and could not be calculated.
* @return string The revision hash, never null. May be computed on the fly.
*/
public function getSha1() {