X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStorage%2FRevisionStoreRecord.php;h=d092f22ed9e806bdf432cc1833b4b80803cfc820;hb=7fedfccdf9e9e8550fc50ca52570a778934226a7;hp=341855dbe33f2f622a094ee2a0d7c07aa13c45e8;hpb=6f680554ceb988f3895184167d5006d722a0afb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Storage/RevisionStoreRecord.php b/includes/Storage/RevisionStoreRecord.php index 341855dbe3..d092f22ed9 100644 --- a/includes/Storage/RevisionStoreRecord.php +++ b/includes/Storage/RevisionStoreRecord.php @@ -81,7 +81,7 @@ class RevisionStoreRecord extends RevisionRecord { // 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 @@ -150,6 +150,7 @@ class RevisionStoreRecord extends RevisionRecord { } /** + * @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() { @@ -163,6 +164,7 @@ class RevisionStoreRecord extends RevisionRecord { } /** + * @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() {